diff --git a/tests/cases/unittests/moduleResolution.ts b/tests/cases/unittests/moduleResolution.ts
index bf7d9cea922..ab5eddc0997 100644
--- a/tests/cases/unittests/moduleResolution.ts
+++ b/tests/cases/unittests/moduleResolution.ts
@@ -1059,9 +1059,7 @@ import b = require("./moduleB.ts");
const diagnostics1 = program1.getFileProcessingDiagnostics().getDiagnostics();
assert.equal(diagnostics1.length, 1, "expected one diagnostic");
- /* tslint:disable no-unused-variable */
- const program2 = createProgram(names, {}, compilerHost, program1);
- /* tslint:enable no-unused-variable */
+ createProgram(names, {}, compilerHost, program1);
assert.isTrue(program1.structureIsReused);
const diagnostics2 = program1.getFileProcessingDiagnostics().getDiagnostics();
assert.equal(diagnostics2.length, 1, "expected one diagnostic");
diff --git a/tests/cases/unittests/reuseProgramStructure.ts b/tests/cases/unittests/reuseProgramStructure.ts
index b3d51ebb75c..6ab90595f9f 100644
--- a/tests/cases/unittests/reuseProgramStructure.ts
+++ b/tests/cases/unittests/reuseProgramStructure.ts
@@ -210,7 +210,6 @@ namespace ts {
}
describe("Reuse program structure", () => {
- /* tslint:disable no-unused-variable */
const target = ScriptTarget.Latest;
const files = [
{ name: "a.ts", text: SourceText.New(
@@ -248,7 +247,7 @@ namespace ts {
it("fails if change affects tripleslash references", () => {
const program_1 = newProgram(files, ["a.ts"], { target });
- const program_2 = updateProgram(program_1, ["a.ts"], { target }, files => {
+ updateProgram(program_1, ["a.ts"], { target }, files => {
const newReferences = `///
///
`;
@@ -259,7 +258,7 @@ namespace ts {
it("fails if change affects imports", () => {
const program_1 = newProgram(files, ["a.ts"], { target });
- const program_2 = updateProgram(program_1, ["a.ts"], { target }, files => {
+ updateProgram(program_1, ["a.ts"], { target }, files => {
files[2].text = files[2].text.updateImportsAndExports("import x from 'b'");
});
assert.isTrue(!program_1.structureIsReused);
@@ -267,7 +266,7 @@ namespace ts {
it("fails if change affects type directives", () => {
const program_1 = newProgram(files, ["a.ts"], { target });
- const program_2 = updateProgram(program_1, ["a.ts"], { target }, files => {
+ updateProgram(program_1, ["a.ts"], { target }, files => {
const newReferences = `
///
///
@@ -279,19 +278,19 @@ namespace ts {
it("fails if module kind changes", () => {
const program_1 = newProgram(files, ["a.ts"], { target, module: ModuleKind.CommonJS });
- const program_2 = updateProgram(program_1, ["a.ts"], { target, module: ModuleKind.AMD }, files => void 0);
+ updateProgram(program_1, ["a.ts"], { target, module: ModuleKind.AMD }, files => void 0);
assert.isTrue(!program_1.structureIsReused);
});
it("fails if rootdir changes", () => {
const program_1 = newProgram(files, ["a.ts"], { target, module: ModuleKind.CommonJS, rootDir: "/a/b" });
- const program_2 = updateProgram(program_1, ["a.ts"], { target, module: ModuleKind.CommonJS, rootDir: "/a/c" }, files => void 0);
+ updateProgram(program_1, ["a.ts"], { target, module: ModuleKind.CommonJS, rootDir: "/a/c" }, files => void 0);
assert.isTrue(!program_1.structureIsReused);
});
it("fails if config path changes", () => {
const program_1 = newProgram(files, ["a.ts"], { target, module: ModuleKind.CommonJS, configFilePath: "/a/b/tsconfig.json" });
- const program_2 = updateProgram(program_1, ["a.ts"], { target, module: ModuleKind.CommonJS, configFilePath: "/a/c/tsconfig.json" }, files => void 0);
+ updateProgram(program_1, ["a.ts"], { target, module: ModuleKind.CommonJS, configFilePath: "/a/c/tsconfig.json" }, files => void 0);
assert.isTrue(!program_1.structureIsReused);
});
@@ -360,7 +359,7 @@ namespace ts {
assert.isTrue(!program_2.structureIsReused);
checkResolvedTypeDirectivesCache(program_3, "/a.ts", undefined);
- const program_4 = updateProgram(program_3, ["/a.ts"], options, files => {
+ updateProgram(program_3, ["/a.ts"], options, files => {
const newReferences = `///
///
`;
@@ -369,7 +368,6 @@ namespace ts {
assert.isTrue(!program_3.structureIsReused);
checkResolvedTypeDirectivesCache(program_1, "/a.ts", { "typedefs": { resolvedFileName: "/types/typedefs/index.d.ts", primary: true } });
});
- /* tslint:enable no-unused-variable */
});
describe("host is optional", () => {
diff --git a/tests/cases/unittests/services/documentRegistry.ts b/tests/cases/unittests/services/documentRegistry.ts
index 854fbde837e..942408c535f 100644
--- a/tests/cases/unittests/services/documentRegistry.ts
+++ b/tests/cases/unittests/services/documentRegistry.ts
@@ -1,7 +1,6 @@
///
describe("DocumentRegistry", () => {
- /* tslint:disable no-unused-variable */
it("documents are shared between projects", () => {
const documentRegistry = ts.createDocumentRegistry();
const defaultCompilerOptions = ts.getDefaultCompilerOptions();
@@ -47,7 +46,7 @@ describe("DocumentRegistry", () => {
const defaultCompilerOptions = ts.getDefaultCompilerOptions();
// Simulate one LS getting the document.
- const f1 = documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, ts.ScriptSnapshot.fromString("var x = 1;"), /* version */ "1");
+ documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, ts.ScriptSnapshot.fromString("var x = 1;"), /* version */ "1");
// Simulate another LS getting the document at another version.
const f2 = documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, ts.ScriptSnapshot.fromString("var x = 1;"), /* version */ "2");
@@ -66,16 +65,15 @@ describe("DocumentRegistry", () => {
snapshot.getChangeRange = old => ts.createTextChangeRange(ts.createTextSpan(0, contents.length), contents.length);
// Simulate one LS getting the document.
- const f1 = documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "1");
+ documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "1");
// Simulate another LS getting that document.
- const f2 = documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "1");
+ documentRegistry.acquireDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "1");
// Now LS1 updates their document.
- const f3 = documentRegistry.updateDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "2");
+ documentRegistry.updateDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "2");
// Now LS2 tries to update their document.
- const f4 = documentRegistry.updateDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "3");
+ documentRegistry.updateDocument("file1.ts", defaultCompilerOptions, snapshot, /* version */ "3");
});
- /* tslint:enable no-unused-variable */
});