Skip to content

Commit

Permalink
try again to fix tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsonk committed Oct 30, 2020
1 parent f07b46d commit b01ad8e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
25 changes: 12 additions & 13 deletions cli/tests/compiler_api_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ Deno.test({
});
assert(diagnostics == null);
assert(actual);
assertEquals(
Object.keys(actual).sort(),
[
"file:///bar.ts.js",
"file:///bar.ts.js.map",
"file:///foo.ts.js",
"file:///foo.ts.js.map",
],
);
let keys = Object.keys(actual).sort();
assert(keys[0].endsWith("/bar.ts.js"));
assert(keys[1].endsWith("/bar.ts.js.map"));
assert(keys[2].endsWith("/foo.ts.js"));
assert(keys[3].endsWith("/foo.ts.js.map"));
},
});

Expand Down Expand Up @@ -54,18 +50,21 @@ Deno.test({
);
assert(diagnostics == null);
assert(actual);
assertEquals(Object.keys(actual), ["file:///foo.ts.js"]);
assert(actual["file:///foo.ts.js"].startsWith("define("));
let keys = Object.keys(actual);
assertEquals(keys.length, 1);
let key = keys[0];
assert(key.endsWith("/foo.ts.js"));
assert(actual[key].startsWith("define("));
},
});

Deno.test({
name: "Deno.compile() - pass lib in compiler options",
async fn() {
const [diagnostics, actual] = await Deno.compile(
"/foo.ts",
"file:///foo.ts",
{
"/foo.ts": `console.log(document.getElementById("foo"));
"file:///foo.ts": `console.log(document.getElementById("foo"));
console.log(Deno.args);`,
},
{
Expand Down
2 changes: 1 addition & 1 deletion cli/tests/lib_ref.ts.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
undefined
[ "file:///main.ts.js", "file:///main.ts.js.map" ]
[ "file:///[WILDCARD]main.ts.js", "file:///[WILDCARD]main.ts.js.map" ]
2 changes: 1 addition & 1 deletion cli/tests/lib_runtime_api.ts.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
undefined
[ "file:///main.ts.js", "file:///main.ts.js.map" ]
[ "file:///[WILDCARD]main.ts.js", "file:///[WILDCARD]main.ts.js.map" ]

0 comments on commit b01ad8e

Please sign in to comment.