Skip to content

Commit 4c32ac0

Browse files
Add test for timestamps write
1 parent 0b47a2d commit 4c32ac0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/harness/unittests/typingsInstaller.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/// <reference path="../harness.ts" />
22
/// <reference path="./tsserverProjectSystem.ts" />
3-
/// <reference path="../../server/typingsInstaller/typingsInstaller.ts" />
3+
/// <reference path="../../server/typingsInstaller/typingsInstaller.ts" />import { deepEqual } from "assert";import { deepEqual } from "assert";
4+
5+
6+
7+
48

59
namespace ts.projectSystem {
610
import TI = server.typingsInstaller;
@@ -1117,6 +1121,7 @@ namespace ts.projectSystem {
11171121

11181122
checkNumberOfProjects(projectService, { inferredProjects: 1 });
11191123
checkProjectActualFiles(p, [file1.path, jquery.path]);
1124+
assert(host.readFile(timestamps.path) !== JSON.stringify({ entries: { "@types/jquery": date.getTime() } }), "timestamps content should be updated");
11201125
});
11211126

11221127
it("non-expired cache entry (inferred project, should not install typings)", () => {

0 commit comments

Comments
 (0)