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')); }); });