fix(test/bench): accept file protocol module specifier CLI args (#14429)

This commit is contained in:
Adilson Schmitt Junior 2022-05-02 21:43:03 +02:00 committed by GitHub
parent 66b9187a2d
commit 256dcb058a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 58 additions and 7 deletions

View file

@ -1,6 +1,7 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use crate::itest;
use deno_core::url::Url;
use test_util as util;
#[test]
@ -351,3 +352,19 @@ fn recursive_permissions_pledge() {
"pledge test permissions called before restoring previous pledge"
));
}
#[test]
fn file_protocol() {
let file_url =
Url::from_file_path(util::testdata_path().join("test/file_protocol.ts"))
.unwrap()
.to_string();
(util::CheckOutputIntegrationTest {
args_vec: vec!["test", &file_url],
exit_code: 0,
output: "test/file_protocol.out",
..Default::default()
})
.run();
}