Skip to content

Commit

Permalink
chore(testing): disable flaky watch e2e in esbuild (nrwl#20390)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored Nov 23, 2023
1 parent 5cd938a commit f964108
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions e2e/esbuild/src/esbuild.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,27 +94,28 @@ describe('EsBuild Plugin', () => {
`
);

// TODO: Investigate why these assertions are flaky in CI
/* Test that watch mode copies assets on start, and again on update.
*/
updateFile(`libs/${myPkg}/assets/a.md`, 'initial a');
const watchProcess = await runCommandUntil(
`build ${myPkg} --watch`,
(output) => {
return output.includes('watching for changes');
}
);
readFile(`dist/libs/${myPkg}/assets/a.md`).includes('initial a');
updateFile(`libs/${myPkg}/assets/a.md`, 'updated a');
await expect(
waitUntil(
() => readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a'),
{
timeout: 20_000,
ms: 500,
}
)
).resolves.not.toThrow();
watchProcess.kill();
// updateFile(`libs/${myPkg}/assets/a.md`, 'initial a');
// const watchProcess = await runCommandUntil(
// `build ${myPkg} --watch`,
// (output) => {
// return output.includes('watching for changes');
// }
// );
// readFile(`dist/libs/${myPkg}/assets/a.md`).includes('initial a');
// updateFile(`libs/${myPkg}/assets/a.md`, 'updated a');
// await expect(
// waitUntil(
// () => readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a'),
// {
// timeout: 20_000,
// ms: 500,
// }
// )
// ).resolves.not.toThrow();
// watchProcess.kill();
}, 300_000);

it('should support bundling everything or only workspace libs', async () => {
Expand Down

0 comments on commit f964108

Please sign in to comment.