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

This commit is contained in:
Jack Hsu 2023-10-03 13:18:12 -04:00 committed by GitHub
parent 2d70eb048f
commit a9230f289f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 12 deletions

View File

@ -106,8 +106,12 @@ describe('EsBuild Plugin', () => {
readFile(`dist/libs/${myPkg}/assets/a.md`).includes('initial a'); readFile(`dist/libs/${myPkg}/assets/a.md`).includes('initial a');
updateFile(`libs/${myPkg}/assets/a.md`, 'updated a'); updateFile(`libs/${myPkg}/assets/a.md`, 'updated a');
await expect( await expect(
waitUntil(() => waitUntil(
readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a') () => readFile(`dist/libs/${myPkg}/assets/a.md`).includes('updated a'),
{
timeout: 20_000,
ms: 500,
}
) )
).resolves.not.toThrow(); ).resolves.not.toThrow();
watchProcess.kill(); watchProcess.kill();

View File

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