Skip to content

Commit da48790

Browse files
authored
Merge pull request #30410 from Microsoft/fixNonDeterministicTest
Fix non deterministic test of tsbuild
2 parents 5afa0d4 + 34ea77f commit da48790

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/testRunner/unittests/tsbuild/resolveJsonModule.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
namespace ts {
22
describe("unittests:: tsbuild:: with resolveJsonModule option", () => {
33
let projFs: vfs.FileSystem;
4+
const { time, tick } = getTime();
45
const allExpectedOutputs = ["/src/dist/src/index.js", "/src/dist/src/index.d.ts", "/src/dist/src/hello.json"];
56
before(() => {
6-
projFs = loadProjectFromDisk("tests/projects/resolveJsonModuleAndComposite");
7+
projFs = loadProjectFromDisk("tests/projects/resolveJsonModuleAndComposite", time);
78
});
89

910
after(() => {
@@ -69,7 +70,7 @@ export default hello.hello`);
6970
for (const output of [...allExpectedOutputs, "/src/dist/src/index.js.map"]) {
7071
assert(fs.existsSync(output), `Expect file ${output} to exist`);
7172
}
72-
73+
tick();
7374
const newBuilder = createSolutionBuilder(host, [configFile], { verbose: true });
7475
newBuilder.buildAllProjects();
7576
host.assertDiagnosticMessages(

0 commit comments

Comments
 (0)