Skip to content

Commit 511b3cd

Browse files
committed
Fix existing TypingsInstaller tests
1 parent 4f7a518 commit 511b3cd

2 files changed

Lines changed: 5 additions & 9 deletions

File tree

src/harness/unittests/tsserverProjectSystem.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,11 @@ namespace ts.projectSystem {
5656
return this.installTypingHost;
5757
}
5858

59-
installPackage(packageName: string) {
60-
return true;
61-
}
62-
6359
isPackageInstalled(packageName: string) {
6460
return true;
6561
}
6662

67-
runTsd(cachePath: string, typingsToInstall: string[], postInstallAction: (installedTypings: string[]) => void) {
63+
runInstall(cachePath: string, typingsToInstall: string[], postInstallAction: (installedTypings: string[]) => void) {
6864
this.postInstallActions.push(map => {
6965
postInstallAction(map(typingsToInstall));
7066
});

src/harness/unittests/typingsInstaller.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ namespace ts.projectSystem {
157157
};
158158
const host = createServerHost([file1]);
159159
let enqueueIsCalled = false;
160-
let runTsdIsCalled = false;
160+
let runInstallIsCalled = false;
161161
const installer = new (class extends TestTypingsInstaller {
162162
constructor() {
163163
super("", host);
@@ -168,8 +168,8 @@ namespace ts.projectSystem {
168168
}
169169
runTsd(cachePath: string, typingsToInstall: string[], postInstallAction: (installedTypings: string[]) => void): void {
170170
assert.deepEqual(typingsToInstall, ["node"]);
171-
runTsdIsCalled = true;
172-
super.runTsd(cachePath, typingsToInstall, postInstallAction);
171+
runInstallIsCalled = true;
172+
super.runInstall(cachePath, typingsToInstall, postInstallAction);
173173
}
174174
})();
175175

@@ -184,7 +184,7 @@ namespace ts.projectSystem {
184184
// autoDiscovery is set in typing options - use it even if project contains only .ts files
185185
projectService.checkNumberOfProjects({ externalProjects: 1 });
186186
assert.isTrue(enqueueIsCalled, "expected 'enqueueIsCalled' to be true");
187-
assert.isTrue(runTsdIsCalled, "expected 'runTsdIsCalled' to be true");
187+
assert.isTrue(runInstallIsCalled, "expected 'runInstallIsCalled' to be true");
188188
});
189189
});
190190
}

0 commit comments

Comments
 (0)