Skip to content

Commit 81e946f

Browse files
Ignore node modules
1 parent 70c496d commit 81e946f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/test-runner/src/runAllTests.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function runAllTests(type: TestType): Promise<void> {
3434
const testRoot = path.join(getCursorlessRepoRoot(), "packages");
3535

3636
let filePattern: string;
37-
let ignore: string[] | undefined = undefined;
37+
let ignore: string[] = [];
3838

3939
switch (type) {
4040
case TestType.unit:
@@ -64,7 +64,7 @@ export function runAllTests(type: TestType): Promise<void> {
6464
async function runTestsInDir(
6565
testRoot: string,
6666
filePattern: string,
67-
ignore: string[] | undefined,
67+
ignore: string[],
6868
): Promise<void> {
6969
// Create the mocha test
7070
const mocha = new Mocha({
@@ -75,7 +75,8 @@ async function runTestsInDir(
7575

7676
const files = await glob(`**/*.${filePattern}`, {
7777
cwd: testRoot,
78-
ignore,
78+
followSymbolicLinks: false,
79+
ignore: ["**/node_modules", ...ignore],
7980
});
8081

8182
if (files.length === 0) {

0 commit comments

Comments
 (0)