From 6044b037fb3efd638e599f39da2b28f53c915319 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Mon, 24 May 2021 23:26:04 +0800 Subject: fix(cli/test): don't use reserved symbol `:` in specifier (#10751) --- cli/tests/integration_tests.rs | 4 ---- cli/tests/test/doc.out | 4 ++-- cli/tools/test_runner.rs | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'cli') diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index d3e578476..dcde0d057 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -18,8 +18,6 @@ use tempfile::TempDir; use test_util as util; use tokio::task::LocalSet; -// TODO(caspervonb): investiate why this fails on Windows. -#[cfg(unix)] #[test] fn typecheck_declarations_ns() { let status = util::deno_cmd() @@ -33,8 +31,6 @@ fn typecheck_declarations_ns() { assert!(status.success()); } -// TODO(caspervonb): investiate why this fails on Windows. -#[cfg(unix)] #[test] fn typecheck_declarations_unstable() { let status = util::deno_cmd() diff --git a/cli/tests/test/doc.out b/cli/tests/test/doc.out index 0f3d02aa3..18f81d3a3 100644 --- a/cli/tests/test/doc.out +++ b/cli/tests/test/doc.out @@ -1,5 +1,5 @@ -Check [WILDCARD]/doc.ts:2-7 +Check [WILDCARD]/doc.ts$2-7 error: TS2367 [ERROR]: This condition will always return 'false' since the types 'string' and 'number' have no overlap. console.assert(example() == 42); ~~~~~~~~~~~~~~~ - at [WILDCARD]/doc.ts:2-7.ts:3:16 + at [WILDCARD]/doc.ts$2-7.ts:3:16 diff --git a/cli/tools/test_runner.rs b/cli/tools/test_runner.rs index c650b2d64..f112eef16 100644 --- a/cli/tools/test_runner.rs +++ b/cli/tools/test_runner.rs @@ -379,7 +379,7 @@ pub async fn run_tests( let location = parsed_module.get_location(&span); let specifier = deno_core::resolve_url_or_path(&format!( - "{}:{}-{}", + "{}${}-{}", location.filename, location.line, location.line + element.as_str().split('\n').count(), -- cgit v1.2.3