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:
parent
30f3b831d3
commit
5af1dcfe29
3 changed files with 9 additions and 1 deletions
|
@ -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,
|
||||
|
|
0
cli/tests/subdir/empty.ts
Normal file
0
cli/tests/subdir/empty.ts
Normal 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,
|
||||
|
|
Loading…
Reference in a new issue