summaryrefslogtreecommitdiff
path: root/cli/tests/unit
diff options
context:
space:
mode:
authorAndrew Mitchell <32021055+mitch292@users.noreply.github.com>2020-06-05 12:01:02 +0000
committerGitHub <noreply@github.com>2020-06-05 08:01:02 -0400
commitc4c6a8dae488a3473ee09b0e3a54943b706d8944 (patch)
tree46e1870821c822d3a725ce16868fd3329955e329 /cli/tests/unit
parent9a783ae4e6789fc90c8a6d62e846c9abd29e7d2f (diff)
fix: Use # to denote line number in stack traces (#6114)
This makes the URLs in stack traces actual URLs to the files. Before: https://deno.land/std/testing/asserts.ts:138:11 After: https://deno.land/std/testing/asserts.ts#138:11
Diffstat (limited to 'cli/tests/unit')
-rw-r--r--cli/tests/unit/dispatch_json_test.ts6
-rw-r--r--cli/tests/unit/dispatch_minimal_test.ts6
-rw-r--r--cli/tests/unit/error_stack_test.ts2
3 files changed, 7 insertions, 7 deletions
diff --git a/cli/tests/unit/dispatch_json_test.ts b/cli/tests/unit/dispatch_json_test.ts
index ebb8217e3..51c63a4db 100644
--- a/cli/tests/unit/dispatch_json_test.ts
+++ b/cli/tests/unit/dispatch_json_test.ts
@@ -2,9 +2,9 @@ import { assert, unitTest, assertMatch, unreachable } from "./test_util.ts";
const openErrorStackPattern = new RegExp(
`^.*
- at unwrapResponse \\(.*dispatch_json\\.ts:.*\\)
- at Object.sendAsync \\(.*dispatch_json\\.ts:.*\\)
- at async Object\\.open \\(.*files\\.ts:.*\\).*$`,
+ at unwrapResponse \\(.*dispatch_json\\.ts#.*\\)
+ at Object.sendAsync \\(.*dispatch_json\\.ts#.*\\)
+ at async Object\\.open \\(.*files\\.ts#.*\\).*$`,
"ms"
);
diff --git a/cli/tests/unit/dispatch_minimal_test.ts b/cli/tests/unit/dispatch_minimal_test.ts
index 12cf4595c..98f482f73 100644
--- a/cli/tests/unit/dispatch_minimal_test.ts
+++ b/cli/tests/unit/dispatch_minimal_test.ts
@@ -8,9 +8,9 @@ import {
const readErrorStackPattern = new RegExp(
`^.*
- at unwrapResponse \\(.*dispatch_minimal\\.ts:.*\\)
- at Object.sendAsyncMinimal \\(.*dispatch_minimal\\.ts:.*\\)
- at async Object\\.read \\(.*io\\.ts:.*\\).*$`,
+ at unwrapResponse \\(.*dispatch_minimal\\.ts#.*\\)
+ at Object.sendAsyncMinimal \\(.*dispatch_minimal\\.ts#.*\\)
+ at async Object\\.read \\(.*io\\.ts#.*\\).*$`,
"ms"
);
diff --git a/cli/tests/unit/error_stack_test.ts b/cli/tests/unit/error_stack_test.ts
index 052cb9591..c3aed3886 100644
--- a/cli/tests/unit/error_stack_test.ts
+++ b/cli/tests/unit/error_stack_test.ts
@@ -93,7 +93,7 @@ unitTest(function prepareStackTrace(): void {
getMockCallSite("CLI_SNAPSHOT.js", 23, 0),
]);
assert(result.startsWith("Error: foo\n"));
- assert(result.includes(".ts:"), "should remap to something in 'js/'");
+ assert(result.includes(".ts#"), "should remap to something in 'js/'");
});
unitTest(function captureStackTrace(): void {