summaryrefslogtreecommitdiff
path: root/js/compiler_test.ts
diff options
context:
space:
mode:
authorSatya Rohith <gsatyarohith@gmail.com>2019-01-04 08:39:07 +0530
committerRyan Dahl <ry@tinyclouds.org>2019-01-03 22:09:07 -0500
commit6be1164d8917b1ee40d344151f387417352fc804 (patch)
tree5c0ef776e978404557da62a07a6744691ac1f4f7 /js/compiler_test.ts
parent4f62a56f9071b0541b6be9b8e9c40fdcc2a3da22 (diff)
Remove assertion for empty modules (#1450)
Diffstat (limited to 'js/compiler_test.ts')
-rw-r--r--js/compiler_test.ts20
1 files changed, 19 insertions, 1 deletions
diff --git a/js/compiler_test.ts b/js/compiler_test.ts
index 21aab180a..3336b64b4 100644
--- a/js/compiler_test.ts
+++ b/js/compiler_test.ts
@@ -52,7 +52,7 @@ function mockModuleInfo(
};
}
-// Some fixtures we will us in testing
+// Some fixtures we will use in testing
const fooBarTsSource = `import * as deno from "deno";
console.log(deno);
export const foo = "bar";
@@ -227,6 +227,14 @@ const moduleMap: {
"console.log('foo');",
undefined,
undefined
+ ),
+ "empty_file.ts": mockModuleInfo(
+ "/moduleKinds/empty_file.ts",
+ "/moduleKinds/empty_file.ts",
+ MediaType.TypeScript,
+ "",
+ undefined,
+ undefined
)
}
};
@@ -637,3 +645,13 @@ test(function compilerResolveModuleNames() {
}
teardown();
});
+
+test(function compilerResolveEmptyFile() {
+ setup();
+ const result = compilerInstance.resolveModuleNames(
+ ["empty_file.ts"],
+ "/moduleKinds"
+ );
+ assertEqual(result[0].resolvedFileName, "/moduleKinds/empty_file.ts");
+ teardown();
+});