Skip to content

Commit

Permalink
added default in switch cases and use spread in rewireContext
Browse files Browse the repository at this point in the history
  • Loading branch information
nktnet committed Oct 12, 2023
1 parent bddf581 commit c412424
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ const retrieveSymbolsFromAst = (node: Statement, symbols: Symbols): void => {
if (node.id !== null) {
symbols.classes.push(node.id.name);
}
break;
default:
break;
}
};

Expand Down
3 changes: 1 addition & 2 deletions src/jewire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ const jewire = (relativePath: string, options: Options = {}): Record<string, any
const rewiredModule = rewire(filePath);

const rewireContext = {
...rewiredModule,
__get__: (name: string) => entityClone(rewiredModule.__get__(name), options.objectClone),
__set__: rewiredModule.__set__,
__with__: rewiredModule.__with__,
};

const entities: Record<string, any> = {};
Expand Down

0 comments on commit c412424

Please sign in to comment.