File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,16 @@ describe('Package configuration', () => {
12
12
13
13
it ( 'should have correct bin configuration' , ( ) => {
14
14
expect ( packageJson . bin ) . toBeDefined ( ) ;
15
- expect ( typeof packageJson . bin ) . toBe ( 'object' ) ;
16
- expect ( packageJson . bin ) . toHaveProperty ( 'mcp-wayback-machine' ) ;
17
- expect ( packageJson . bin [ 'mcp-wayback-machine' ] ) . toBe ( 'dist/index.js' ) ;
15
+ // Handle both string and object forms of bin
16
+ if ( typeof packageJson . bin === 'string' ) {
17
+ // If bin is a string, it should be the path directly
18
+ expect ( packageJson . bin ) . toBe ( 'dist/index.js' ) ;
19
+ } else {
20
+ // If bin is an object, check the property
21
+ expect ( typeof packageJson . bin ) . toBe ( 'object' ) ;
22
+ expect ( packageJson . bin ) . toHaveProperty ( 'mcp-wayback-machine' ) ;
23
+ expect ( packageJson . bin [ 'mcp-wayback-machine' ] ) . toBe ( 'dist/index.js' ) ;
24
+ }
18
25
} ) ;
19
26
20
27
it ( 'should have correct main entry point' , ( ) => {
You can’t perform that action at this time.
0 commit comments