Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d21fc2

Browse files
fix: fix failing ci due to esm issues
1 parent cdad09e commit 1d21fc2

3 files changed

Lines changed: 12 additions & 9 deletions

File tree

.mocharc.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"require": "ts-node/register",
3-
"extensions": ["ts"],
4-
"spec": [
5-
"src/**/*spec.ts"
6-
]
7-
}
2+
"require": ["ts-node/register", "tsconfig-paths/register"],
3+
"node-option": [
4+
"no-warnings",
5+
"experimental-specifier-resolution=node"
6+
],
7+
"extensions": [".ts", ".tsx"],
8+
"spec": "src/**/*.spec.ts"
9+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "mocha --require ts-node/register --require tsconfig-paths/register 'src/**/*.spec.ts'",
7+
"test": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"CommonJS\"}' mocha",
88
"prepare": "husky",
99
"commit": "git-cz",
1010
"validate": "pnpm run format:check && pnpm run lint && pnpm run typecheck",

tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
"skipLibCheck": true,
1313
"noFallthroughCasesInSwitch": true,
1414
"resolveJsonModule": true,
15-
"sourceMap": true
15+
"sourceMap": true,
16+
"baseUrl": "."
1617
},
17-
"include": ["src/**/*", "src/**/*.test.ts"],
18+
"include": ["src/**/*", "src/**/*.spec.ts"],
1819
"exclude": ["node_modules", "dist"]
1920
}

0 commit comments

Comments
 (0)