1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -05:00

fix(cli): do not throw on empty typescript files (#8143)

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
This commit is contained in:
Kitson Kelly 2020-10-27 23:19:27 +11:00 committed by GitHub
parent 30f3b831d3
commit 5af1dcfe29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View file

@ -2273,6 +2273,11 @@ itest!(config {
output: "config.ts.out",
});
itest!(emtpy_typescript {
args: "run --reload subdir/empty.ts",
output_str: Some("Check file:[WILDCARD]tests/subdir/empty.ts\n"),
});
itest!(error_001 {
args: "run --reload error_001.ts",
exit_code: 1,

View file

View file

@ -374,7 +374,10 @@ delete Object.prototype.__proto__;
"op_load",
{ specifier },
);
assert(data, `"data" is unexpectedly null for "${specifier}".`);
assert(
data != null,
`"data" is unexpectedly null for "${specifier}".`,
);
sourceFile = ts.createSourceFile(
specifier,
data,