From 380f950d4d48e9f8d747b7ef5c9d7e8400bfd97b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 19 Aug 2017 10:22:46 -0700 Subject: [PATCH] Clean up --- fixtures/typings-test/tsconfig.json | 2 +- .../typings-test/{typing-tests.ts => typings-test.ts} | 0 src/Terminal.integration.ts | 10 ++++++---- 3 files changed, 7 insertions(+), 5 deletions(-) rename fixtures/typings-test/{typing-tests.ts => typings-test.ts} (100%) diff --git a/fixtures/typings-test/tsconfig.json b/fixtures/typings-test/tsconfig.json index 2f78a6d06..2dcff2ea1 100644 --- a/fixtures/typings-test/tsconfig.json +++ b/fixtures/typings-test/tsconfig.json @@ -1,6 +1,6 @@ { "files": [ - "typing-tests.ts" + "typings-test.ts" ], "compilerOptions": { "module": "commonjs", diff --git a/fixtures/typings-test/typing-tests.ts b/fixtures/typings-test/typings-test.ts similarity index 100% rename from fixtures/typings-test/typing-tests.ts rename to fixtures/typings-test/typings-test.ts diff --git a/src/Terminal.integration.ts b/src/Terminal.integration.ts index 31d2ad5da..7e4ed8704 100644 --- a/src/Terminal.integration.ts +++ b/src/Terminal.integration.ts @@ -147,11 +147,13 @@ if (os.platform() !== 'win32') { } describe('typings', () => { - it('should throw no compile errors', function () { + it('should throw no compile errors', function (): void { this.timeout(20000); - let result = cp.spawnSync(path.join(__dirname, '..', 'node_modules', '.bin', 'tsc'), { - cwd: path.join(__dirname, '..', 'fixtures', 'typings-test') - }); + const tsc = path.join(__dirname, '..', 'node_modules', '.bin', 'tsc'); + const fixtureDir = path.join(__dirname, '..', 'fixtures', 'typings-test'); + let result = cp.spawnSync(tsc, { cwd: fixtureDir }); assert.equal(result.status, 0, `build did not succeed:\nstdout: ${result.stdout.toString()}\nstderr: ${result.stderr.toString()}\n`); + // Clean up + fs.unlinkSync(path.join(fixtureDir, 'typings-test.js')); }); });