Skip to content

Commit e34fcd6

Browse files
authored
Merge pull request #529 from MatrixAI/feature-swc-jest
Swapping to SWC, Updating to M1 MacOS, and updating dependencies
2 parents b901d25 + 68da4b1 commit e34fcd6

File tree

5 files changed

+7663
-9509
lines changed

5 files changed

+7663
-9509
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ integration:linux:
402402
- job: integration:deployment
403403
optional: true
404404
tags:
405-
- shared-macos-amd64
406-
image: macos-11-xcode-12
405+
- saas-macos-medium-m1
406+
image: macos-12-xcode-14
407407
script:
408408
- for f in ./builds/*-macos-x64*; do "$f"; done
409409
rules:

babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

jest.config.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {
99
prefix: '<rootDir>/src/',
1010
});
1111

12-
// using panva/jose with jest requires subpath exports
13-
// https://github.com/panva/jose/discussions/105
14-
moduleNameMapper['^jose/(.*)$'] = "<rootDir>/node_modules/jose/dist/node/cjs/$1";
15-
1612
// Global variables that are shared across the jest worker pool
1713
// These variables must be static and serializable
1814
if ((process.env.PK_TEST_PLATFORM != null) !== (process.env.PK_TEST_COMMAND != null)) throw Error('Both PK_TEST_PLATFORM and PK_TEST_COMMAND must be set together.')
@@ -50,8 +46,21 @@ module.exports = {
5046
roots: ['<rootDir>/tests'],
5147
testMatch: ['**/?(*.)+(spec|test|unit.test).+(ts|tsx|js|jsx)'],
5248
transform: {
53-
'^.+\\.tsx?$': 'ts-jest',
54-
'^.+\\.jsx?$': 'babel-jest',
49+
"^.+\\.(t|j)sx?$": [
50+
"@swc/jest",
51+
{
52+
"jsc": {
53+
"parser": {
54+
"syntax": "typescript",
55+
"dynamicImport": true,
56+
"tsx": true,
57+
"decorators": compilerOptions.experimentalDecorators,
58+
},
59+
"target": compilerOptions.target.toLowerCase(),
60+
"keepClassNames": true,
61+
},
62+
}
63+
],
5564
},
5665
reporters: [
5766
'default',

0 commit comments

Comments
 (0)