From bb2f1f18425cef8c0597d004abf103f23fdb2f40 Mon Sep 17 00:00:00 2001 From: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com> Date: Fri, 14 Jul 2023 11:22:19 -0400 Subject: [PATCH] Looks like the typescript tests potentially weren't running before, but they are now? --- tests/smoke-tests/--typescript.test.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/smoke-tests/--typescript.test.ts b/tests/smoke-tests/--typescript.test.ts index 8b9784fe..6b03a375 100644 --- a/tests/smoke-tests/--typescript.test.ts +++ b/tests/smoke-tests/--typescript.test.ts @@ -17,6 +17,7 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { let cwd = ''; let tmpDir = ''; let distDir = ''; + let declarationsDir = ''; beforeAll(async () => { tmpDir = await createTmp(); @@ -28,12 +29,13 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { cwd = path.join(tmpDir, name); distDir = path.join(cwd, name, 'dist'); + declarationsDir = path.join(cwd, name, 'declarations'); await install({ cwd, packageManager, skipPrepare: true }); }); afterAll(async () => { - await fs.rm(tmpDir, { recursive: true, force: true }); + // await fs.rm(tmpDir, { recursive: true, force: true }); }); it('was generated correctly', async () => { @@ -47,17 +49,22 @@ for (let packageManager of SUPPORTED_PACKAGE_MANAGERS) { expect(exitCode).toEqual(0); - let contents = await dirContents(distDir); + let distContents = await dirContents(distDir); + let declarationsContents = await dirContents(declarationsDir); - expect(contents).to.deep.equal([ - 'index.d.ts', - 'index.d.ts.map', + expect(distContents).to.deep.equal([ 'index.js', 'index.js.map', - 'template-registry.d.ts', 'template-registry.js', 'template-registry.js.map', ]); + + expect(declarationsContents).to.deep.equal([ + 'index.d.ts', + 'index.d.ts.map', + 'template-registry.d.ts', + 'template-registry.d.ts.map', + ]); }); it('runs tests', async () => {