Skip to content

Commit

Permalink
SQNC-46: updated package.json script for integration test to utilize SWC
Browse files Browse the repository at this point in the history
  • Loading branch information
n3op2 committed Nov 21, 2024
1 parent a7f6a60 commit 785aa5e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .swcrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
"syntax": "typescript",
"tsx": false,
"decorators": true,
"dynamicImport": true,
"dynamicImport": true
},
"transform": {
"legacyDecorator": true,
"useDefineForClassFields": true
},
"target": "es2022",
"target": "es2022"
},
"exclude": [
"/__test__/"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "src/index.ts",
"scripts": {
"build": "npm run tsoa:build && swc ./src -d ./build --strip-leading-paths --copy-files",
"test": "NODE_ENV=test ./node_modules/.bin/mocha --config ./test/mocharc.json ./test/**/*.test.ts",
"test": "SWCRC=true NODE_ENV=dev node --trace-warnings --enable-source-maps ./node_modules/.bin/mocha --config ./test/mocharc.json ./test/**/*.test.ts",
"lint": "prettier -c ./src ./test ./migrations",
"lint:fix": "npm run lint -- -w",
"depcheck": "depcheck",
Expand Down
4 changes: 4 additions & 0 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const envConfig = {
IDP_JWKS_PATH: envalid.str({
default: '/certs',
}),

IDP_AUTH_PATH: envalid.str({
default: '/auth',
}),
}

export type ENV_CONFIG = typeof envConfig
Expand Down
3 changes: 2 additions & 1 deletion test/mocharc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"timeout": 5000,
"exit": true,
"extension": "js",
"esm": true,
"extension": "ts",
"file": ["test/init.ts"],
"node-option": ["import=@swc-node/register/esm-register"]
}

0 comments on commit 785aa5e

Please sign in to comment.