Skip to content

Commit

Permalink
test: remove strict mode for inline transpile
Browse files Browse the repository at this point in the history
  • Loading branch information
davidenke committed Oct 21, 2024
1 parent f4a7029 commit a1da734
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ globalThis.serializeShape = global.serializeShape = function (type) {
};

globalThis.transpileFrom = global.transpileFrom = function (source) {
const { outputText } = transpileModule(source, tsConfig as unknown as TranspileOptions);
// remove strict mode for inline transpilation, as it would add `use strict` to the output
const options = { ...tsConfig, compilerOptions: { ...tsConfig.compilerOptions, strict: false } };
const { outputText } = transpileModule(source, options as unknown as TranspileOptions);
return outputText;
};

Expand Down

0 comments on commit a1da734

Please sign in to comment.