Skip to content

Commit

Permalink
Fix renovation's jest tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilya Vinogradov committed Sep 6, 2023
1 parent d76838b commit fe8c7b1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ module.exports = {
const result = compileCode(generator, src, {
path: filename,
dirname: path.dirname(filename),
},
true);
}, { includeExtraComponents: true });

if(result && result[1]) {
const componentName = (result[1].code.match(/export default class (\w+) extends/) || [])[1];
Expand All @@ -35,7 +34,7 @@ module.exports = {
ts.transpileModule(
// Vitik: jest.tsconfig set jsxFactory to h. Add import for support it.
// In propduction jsx transpaled by babel-plugin-inferno
`import { createElement as h } from "inferno-create-element";
`import { createElement as h } from "inferno-create-element";
${result[0].code}
${result[1].code
.replace('export default', 'export ')
Expand Down

0 comments on commit fe8c7b1

Please sign in to comment.