Skip to content

Commit 6fe0a57

Browse files
committed
feat: enabled SWC compiler for tests
1 parent 3600f44 commit 6fe0a57

File tree

4 files changed

+57
-18
lines changed

4 files changed

+57
-18
lines changed

.swcrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json.schemastore.org/swcrc",
3+
"sourceMaps": true,
4+
"jsc": {
5+
"parser": {
6+
"syntax": "typescript",
7+
"decorators": true,
8+
"dynamicImport": true
9+
},
10+
"transform": {
11+
"legacyDecorator": true,
12+
"decoratorMetadata": true
13+
},
14+
"baseUrl": "./"
15+
},
16+
"minify": false
17+
}

jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const jestConfig: JestConfigWithTsJest = {
1010
rootDir: '.',
1111
testRegex: '\\.spec\\.ts$',
1212
transform: {
13-
'^.+\\.[jt]s$': 'ts-jest',
13+
'^.+\\.(t|j)sx?$': '@swc/jest',
1414
},
1515
testEnvironment: 'node',
1616
};

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@nestjs/core": "^10.1.3",
4747
"@nestjs/platform-fastify": "^10.1.3",
4848
"@nestjs/swagger": "^7.1.8",
49+
"@swc/jest": "^0.2.29",
4950
"axios": "^1.4.0",
5051
"class-transformer": "^0.5.1",
5152
"class-validator": "^0.14.0",

pnpm-lock.yaml

+38-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)