Skip to content

Commit a9230f2

Browse files
authoredOct 3, 2023
chore(js): re-enable skipped test (#19427)
1 parent 2d70eb0 commit a9230f2

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed
 

‎e2e/esbuild/src/esbuild.test.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,12 @@ describe('EsBuild Plugin', () => {
106106
readFile(`dist/libs/${myPkg}/assets/a.md`).includes('initial a');
107107
updateFile(`libs/${myPkg}/assets/a.md`, 'updated a');
108108
await expect(
109-
waitUntil(() =>
110-
readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a')
109+
waitUntil(
110+
() => readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a'),
111+
{
112+
timeout: 20_000,
113+
ms: 500,
114+
}
111115
)
112116
).resolves.not.toThrow();
113117
watchProcess.kill();

‎e2e/js/src/js-executor-tsc.test.ts

+25-10
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ describe('js:tsc executor', () => {
2727
beforeAll(() => (scope = newProject()));
2828
afterAll(() => cleanupProject());
2929

30-
// TODO: Re-enable this when it is passing again
31-
xit('should create libs with js executors (--compiler=tsc)', async () => {
30+
it('should create libs with js executors (--compiler=tsc)', async () => {
3231
const lib = uniq('lib');
3332
runCLI(`generate @nx/js:lib ${lib} --bundler=tsc --no-interactive`);
3433
const libPackageJson = readJson(`libs/${lib}/package.json`);
@@ -71,20 +70,36 @@ describe('js:tsc executor', () => {
7170
});
7271
updateFile(`libs/${lib}/docs/a/b/nested.md`, 'Nested File');
7372
await expect(
74-
waitUntil(() =>
75-
readFile(`dist/libs/${lib}/README.md`).includes(`Hello, World!`)
73+
waitUntil(
74+
() => readFile(`dist/libs/${lib}/README.md`).includes(`Hello, World!`),
75+
{
76+
timeout: 20_000,
77+
ms: 500,
78+
}
7679
)
7780
).resolves.not.toThrow();
7881
await expect(
79-
waitUntil(() =>
80-
readFile(`dist/libs/${lib}/docs/a/b/nested.md`).includes(`Nested File`)
82+
waitUntil(
83+
() =>
84+
readFile(`dist/libs/${lib}/docs/a/b/nested.md`).includes(
85+
`Nested File`
86+
),
87+
{
88+
timeout: 20_000,
89+
ms: 500,
90+
}
8191
)
8292
).resolves.not.toThrow();
8393
await expect(
84-
waitUntil(() =>
85-
readFile(`dist/libs/${lib}/package.json`).includes(
86-
`"version": "999.9.9"`
87-
)
94+
waitUntil(
95+
() =>
96+
readFile(`dist/libs/${lib}/package.json`).includes(
97+
`"version": "999.9.9"`
98+
),
99+
{
100+
timeout: 20_000,
101+
ms: 500,
102+
}
88103
)
89104
).resolves.not.toThrow();
90105
libBuildProcess.kill();

0 commit comments

Comments
 (0)
Please sign in to comment.