Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 511b3cd

Browse filesBrowse files
committed
Fix existing TypingsInstaller tests
1 parent 4f7a518 commit 511b3cd
Copy full SHA for 511b3cd

2 files changed

+5-9Lines changed: 5 additions & 9 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/harness/unittests/tsserverProjectSystem.ts‎

Copy file name to clipboardExpand all lines: src/harness/unittests/tsserverProjectSystem.ts
+1-5Lines 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
});
Collapse file

‎src/harness/unittests/typingsInstaller.ts‎

Copy file name to clipboardExpand all lines: src/harness/unittests/typingsInstaller.ts
+4-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.