Skip to content

Commit

Permalink
Replaced ts-jest with @swc/jest and swc-plugin-inferno
Browse files Browse the repository at this point in the history
  • Loading branch information
Havunen committed Oct 8, 2023
1 parent 3753577 commit c0706da
Show file tree
Hide file tree
Showing 7 changed files with 7,811 additions and 6,920 deletions.
6 changes: 0 additions & 6 deletions .babelrc.test

This file was deleted.

12 changes: 1 addition & 11 deletions fixtures/browser/karma.babel.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ module.exports = function (config) {
test: /\.(ts|tsx|js|jsx)$/,
exclude: /(node_modules)/,
use: {
// `.swcrc` can be used to configure swc
loader: 'swc-loader',
options: {
"jsc": {
Expand All @@ -97,16 +96,7 @@ module.exports = function (config) {
],
},
"target": "es2022",
"loose": true,
"transform": {
"optimizer": {
"globals": {
"vars": {
"__DEBUG__": "true"
}
}
}
}
"loose": true
}
}
},
Expand Down
12 changes: 1 addition & 11 deletions fixtures/browser/karma.swc.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ module.exports = function (config) {
test: /\.(ts|tsx|js|jsx)$/,
exclude: /(node_modules)/,
use: {
// `.swcrc` can be used to configure swc
loader: 'swc-loader',
options: {
"jsc": {
Expand All @@ -97,16 +96,7 @@ module.exports = function (config) {
],
},
"target": "es2022",
"loose": true,
"transform": {
"optimizer": {
"globals": {
"vars": {
"__DEBUG__": "true"
}
}
}
}
"loose": true
}
}
},
Expand Down
22 changes: 0 additions & 22 deletions jest.babel.transform.js

This file was deleted.

20 changes: 17 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export default {
preset: "ts-jest",
collectCoverageFrom: [
"packages/*/src/**/*.ts",
"!**/*.ts.js",
Expand Down Expand Up @@ -27,8 +26,23 @@ export default {
"<rootDir>/packages/inferno/__tests__/transition.spec.tsx",
],
transform: {
"^.+\\.jsx?$": "<rootDir>/jest.babel.transform.js",
"^.+\\.tsx?$": [ "ts-jest", { "babelConfig": "<rootDir>/.babelrc.test" } ],
"^.+\\.(t|j)sx?$": ['@swc/jest', {
"jsc": {
"parser": {
"syntax": "typescript",
"tsx": true,
},
"experimental": {
"plugins": [
["swc-plugin-inferno", {
"pure": false
}]
],
},
"target": "es2022",
"loose": true
}
}],
},
testEnvironment: "jsdom",
testRunner: "jest-jasmine2",
Expand Down
Loading

0 comments on commit c0706da

Please sign in to comment.