Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(js): re-enable skipped test #19427

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions e2e/esbuild/src/esbuild.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ describe('EsBuild Plugin', () => {
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')
waitUntil(
() => readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a'),
{
timeout: 20_000,
ms: 500,
}
)
).resolves.not.toThrow();
watchProcess.kill();
Expand Down
35 changes: 25 additions & 10 deletions e2e/js/src/js-executor-tsc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ describe('js:tsc executor', () => {
beforeAll(() => (scope = newProject()));
afterAll(() => cleanupProject());

// TODO: Re-enable this when it is passing again
xit('should create libs with js executors (--compiler=tsc)', async () => {
it('should create libs with js executors (--compiler=tsc)', async () => {
const lib = uniq('lib');
runCLI(`generate @nx/js:lib ${lib} --bundler=tsc --no-interactive`);
const libPackageJson = readJson(`libs/${lib}/package.json`);
Expand Down Expand Up @@ -71,20 +70,36 @@ describe('js:tsc executor', () => {
});
updateFile(`libs/${lib}/docs/a/b/nested.md`, 'Nested File');
await expect(
waitUntil(() =>
readFile(`dist/libs/${lib}/README.md`).includes(`Hello, World!`)
waitUntil(
() => readFile(`dist/libs/${lib}/README.md`).includes(`Hello, World!`),
{
timeout: 20_000,
ms: 500,
}
)
).resolves.not.toThrow();
await expect(
waitUntil(() =>
readFile(`dist/libs/${lib}/docs/a/b/nested.md`).includes(`Nested File`)
waitUntil(
() =>
readFile(`dist/libs/${lib}/docs/a/b/nested.md`).includes(
`Nested File`
),
{
timeout: 20_000,
ms: 500,
}
)
).resolves.not.toThrow();
await expect(
waitUntil(() =>
readFile(`dist/libs/${lib}/package.json`).includes(
`"version": "999.9.9"`
)
waitUntil(
() =>
readFile(`dist/libs/${lib}/package.json`).includes(
`"version": "999.9.9"`
),
{
timeout: 20_000,
ms: 500,
}
)
).resolves.not.toThrow();
libBuildProcess.kill();
Expand Down