forked from microsoft/typescript-error-deltas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprojectGraph.test.ts
44 lines (43 loc) · 1.57 KB
/
projectGraph.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import path = require('path')
import { getProjectsToBuild } from './projectGraph'
describe("getProjectsToBuild", () => {
it("gets a simple project", () => {
expect(getProjectsToBuild("./test/simpleProject")).toEqual({
simpleProjects: [{
// TODO: Assertion only on the end of the path
path: "/home/nathansa/src/TypeScriptErrorDeltas/test/simpleProject/tsconfig.json",
hasParseError: false,
hasExtensionError: false,
hasReferenceError: false,
isComposite: false,
references: [],
referencedBy: [],
extends: [],
extendedBy: [],
contents: '',
}],
rootCompositeProjects: [],
scriptedProjects: [],
hasError: false,
})
})
it("gets a script project", () => {
expect(getProjectsToBuild("./test/scriptProject")).toEqual({
simpleProjects: [],
rootCompositeProjects: [],
scriptedProjects: [{
path: "test/scriptProject/build.sh",
contents: "node $TS/built/local/tsc.js --skipLibCheck --incremental false --pretty false main.ts\n",
hasParseError: false,
hasExtensionError: false,
hasReferenceError: false,
isComposite: false,
references: [],
referencedBy: [],
extends: [],
extendedBy: [],
}],
hasError: false,
})
})
})