Skip to content

Commit 67f32c8

Browse files
test(build-tools): Remove unused use of ts-node, put spec in config (microsoft#26311)
## Description ts-node allows node to load ts files. The spec in this mocha config points at the JS files so ts-node is not needed. For unknown reasons the unnecessary use of ts-node caused node to segfault when I tried to debug tests so I had to remove it for debugging, and keeping it removed seems like a good idea. To also aid in debugging I moved the spec into the config so a `pnpm exec mocha` is sufficient to debug tests. This is how mocha is setup in client and works well there.
1 parent 17017c4 commit 67f32c8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"require": ["ts-node/register"],
32
"watch-extensions": ["ts", "cts", "mts"],
43
"recursive": true,
54
"reporter": "mocha-multi-reporters",
65
"reporter-options": "configFile=mocha-multi-reporter-config.json",
76
"timeout": 60000,
8-
"node-option": ["loader=ts-node/esm"]
7+
"spec": "lib/test/**/*.test.*js"
98
}

build-tools/packages/build-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"postpack": "npm run clean:manifest",
5757
"test": "npm run test:mocha",
5858
"test:coverage": "c8 npm run test",
59-
"test:mocha": "mocha --forbid-only \"lib/test/**/*.test.*js\""
59+
"test:mocha": "mocha --forbid-only"
6060
},
6161
"c8": {
6262
"all": true,

0 commit comments

Comments
 (0)