Skip to content

Commit

Permalink
Default to TS's polling watcher for our tests
Browse files Browse the repository at this point in the history
The filesystem watcher (which they changed to by default in TS 4.9) is
just too unstable in the GH Actions runner for us to count on.
  • Loading branch information
dfreeman committed Nov 15, 2023
1 parent 20a34cc commit 1466eb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test-packages/test-utils/src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const ROOT = pathUtils.normalizeFilePath(path.resolve(dirname, '../../ephemeral'
interface TsconfigWithGlint {
extends?: string;
compilerOptions?: Record<string, unknown>; // no appropriate types exist :sigh:
watchOptions?: Record<string, unknown>; // https://www.typescriptlang.org/tsconfig#watchOptions
references?: Array<{ path: string }>;
files?: Array<string>;
include?: Array<string>;
Expand Down Expand Up @@ -69,7 +70,7 @@ export class Project {
}

let project = new Project(rootDir);
let tsconfig = {
let tsconfig: TsconfigWithGlint = {
compilerOptions: {
strict: true,
target: 'es2019',
Expand All @@ -80,6 +81,11 @@ export class Project {
checkJs: false,
...config.compilerOptions,
},
watchOptions: {
watchFile: 'fixedPollingInterval',
watchDirectory: 'fixedPollingInterval',
synchronousWatchDirectory: true,
},
glint: config.glint ?? {
environment: 'glimmerx',
},
Expand Down

0 comments on commit 1466eb1

Please sign in to comment.