File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/publisher/base/test Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,19 @@ describe('Publisher', () => {
13
13
expect ( publisher ) . to . have . property ( '__isElectronForgePublisher' , true ) ;
14
14
} ) ;
15
15
16
+ it ( '__isElectronForgePublisher should not be settable' , ( ) => {
17
+ const publisher = new PublisherImpl ( null ) ;
18
+ expect ( ( ) => {
19
+ ( publisher as any ) . __isElectronForgePublisher = false ;
20
+ } ) . to . throw ( ) ;
21
+ expect ( ( ) => {
22
+ Object . defineProperty ( publisher , '__isElectronForgePublisher' , {
23
+ value : false ,
24
+ } ) ;
25
+ } ) . to . throw ( ) ;
26
+ expect ( publisher ) . to . have . property ( '__isElectronForgePublisher' , true ) ;
27
+ } ) ;
28
+
16
29
it ( 'should throw an error when publish is called is called' , ( done ) => {
17
30
const publisher = new PublisherImpl ( null ) ;
18
31
publisher . publish ( { } as any ) . catch ( ( ) => done ( ) ) ;
You can’t perform that action at this time.
0 commit comments