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', () => {
1313 expect ( publisher ) . to . have . property ( '__isElectronForgePublisher' , true ) ;
1414 } ) ;
1515
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+
1629 it ( 'should throw an error when publish is called is called' , ( done ) => {
1730 const publisher = new PublisherImpl ( null ) ;
1831 publisher . publish ( { } as any ) . catch ( ( ) => done ( ) ) ;
You can’t perform that action at this time.
0 commit comments