Skip to content

Commit

Permalink
really fix tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Dec 22, 2020
1 parent 5c32d3e commit 15329b9
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions cli/tests/compiler_api_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,10 @@ Deno.test({
assertEquals(diagnostics.length, 0);
assert(!ignoredOptions);
assertEquals(stats.length, 3);
assertEquals(
Object.keys(files).sort(),
["file:///foo.ts.js", "file:///foo.ts.js.map"],
);
assert(files["file:///foo.ts.js"].startsWith("export var Foo;"));
const keys = Object.keys(files).sort();
assert(keys[0].endsWith("/foo.ts.js"));
assert(keys[1].endsWith("/foo.ts.js.map"));
assert(files[keys[0]].startsWith("export var Foo;"));
},
});

Expand All @@ -166,11 +165,10 @@ Deno.test({
assertEquals(diagnostics.length, 0);
assert(!ignoredOptions);
assertEquals(stats.length, 3);
assertEquals(
Object.keys(files).sort(),
["file:///foo.ts.js", "file:///foo.ts.js.map"],
);
assert(!files["file:///foo.ts.js"].includes("This is JSDoc"));
const keys = Object.keys(files).sort();
assert(keys[0].endsWith("/foo.ts.js"));
assert(keys[1].endsWith("/foo.ts.js.map"));
assert(!files[keys[0]].includes("This is JSDoc"));
},
});

Expand Down Expand Up @@ -245,10 +243,9 @@ Deno.test({
},
);
assertEquals(diagnostics.length, 1);
assertEquals(
Object.keys(files).sort(),
["file:///foo.ts.js", "file:///foo.ts.js.map"],
);
const keys = Object.keys(files).sort();
assert(keys[0].endsWith("/foo.ts.js"));
assert(keys[1].endsWith("/foo.ts.js.map"));
},
});

Expand Down

0 comments on commit 15329b9

Please sign in to comment.