Skip to content

Commit

Permalink
fix(compiler): fix transitive module dependencies in unit tests (#2178)…
Browse files Browse the repository at this point in the history
… (#2549)
  • Loading branch information
chrisdarroch committed Jul 4, 2020
1 parent c3533f0 commit 6585dd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/transpile.ts
Expand Up @@ -124,7 +124,8 @@ const transpileJson = (results: TranspileResults) => {
results.map = { mappings: '' };
};

const shouldTranspileModule = (ext: string) => ext === 'tsx' || ext === 'ts' || ext === 'jsx' || ext === 'mjs';
// @todo: could/should this be borrowed from either tsconfig's allowJs or jest config's ?
const shouldTranspileModule = (ext: string) => ['tsx', 'ts', 'mjs', 'jsx', 'js'].includes(ext);

export const compile = (code: string, opts: any = {}): Promise<any> => {
console.warn(`compile() deprecated, please use transpile() instead`);
Expand Down

0 comments on commit 6585dd1

Please sign in to comment.