mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-06 04:35:21 -05:00
Add a testcase
This commit is contained in:
@@ -259,6 +259,23 @@ namespace ts {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("tsbuild - downstream prepend projects always get rebuilt", () => {
|
||||
const fs = outFileFs.shadow();
|
||||
const host = new fakes.CompilerHost(fs);
|
||||
const builder = createSolutionBuilder(host, buildHost, ["/src/third"], { dry: false, force: false, verbose: false });
|
||||
clearDiagnostics();
|
||||
builder.buildAllProjects();
|
||||
assertDiagnosticMessages(/*none*/);
|
||||
assert.equal(fs.statSync("src/third/thirdjs/output/third-output.js").mtimeMs, time(), "First build timestamp is correct");
|
||||
tick();
|
||||
replaceText(fs, "src/first/first_PART1.ts", "Hello", "Hola");
|
||||
tick();
|
||||
builder.resetBuildContext();
|
||||
builder.buildAllProjects();
|
||||
assertDiagnosticMessages(/*none*/);
|
||||
assert.equal(fs.statSync("src/third/thirdjs/output/third-output.js").mtimeMs, time(), "Second build timestamp is correct");
|
||||
});
|
||||
}
|
||||
|
||||
describe("tsbuild - graph-ordering", () => {
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
"declaration": true,
|
||||
"outFile": "./bin/first-output.js"
|
||||
},
|
||||
"files": [
|
||||
"first_PART1.ts",
|
||||
"first_part2.ts",
|
||||
"first_part3.ts"
|
||||
],
|
||||
"references": [
|
||||
]
|
||||
}
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
"declaration": true,
|
||||
"outFile": "./thirdjs/output/third-output.js"
|
||||
},
|
||||
"files": [
|
||||
"third_part1.ts"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../first", "prepend": true },
|
||||
{ "path": "../second", "prepend": true },
|
||||
|
||||
Reference in New Issue
Block a user