Skip to content

Commit

Permalink
Merge pull request #529 from MatrixAI/feature-swc-jest
Browse files Browse the repository at this point in the history
Swapping to SWC, Updating to M1 MacOS, and updating dependencies
  • Loading branch information
tegefaulkes authored Jul 7, 2023
2 parents b901d25 + 68da4b1 commit e34fcd6
Show file tree
Hide file tree
Showing 5 changed files with 7,663 additions and 9,509 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ integration:linux:
- job: integration:deployment
optional: true
tags:
- shared-macos-amd64
image: macos-11-xcode-12
- saas-macos-medium-m1
image: macos-12-xcode-14
script:
- for f in ./builds/*-macos-x64*; do "$f"; done
rules:
Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

21 changes: 15 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/src/',
});

// using panva/jose with jest requires subpath exports
// https://github.com/panva/jose/discussions/105
moduleNameMapper['^jose/(.*)$'] = "<rootDir>/node_modules/jose/dist/node/cjs/$1";

// Global variables that are shared across the jest worker pool
// These variables must be static and serializable
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.')
Expand Down Expand Up @@ -50,8 +46,21 @@ module.exports = {
roots: ['<rootDir>/tests'],
testMatch: ['**/?(*.)+(spec|test|unit.test).+(ts|tsx|js|jsx)'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
'^.+\\.jsx?$': 'babel-jest',
"^.+\\.(t|j)sx?$": [
"@swc/jest",
{
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"tsx": true,
"decorators": compilerOptions.experimentalDecorators,
},
"target": compilerOptions.target.toLowerCase(),
"keepClassNames": true,
},
}
],
},
reporters: [
'default',
Expand Down
Loading

0 comments on commit e34fcd6

Please sign in to comment.