diff options
Diffstat (limited to 'cli/tests')
-rw-r--r-- | cli/tests/unit/dispatch_bin_test.ts | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/cli/tests/unit/dispatch_bin_test.ts b/cli/tests/unit/dispatch_bin_test.ts index ca1864621..54a379bc0 100644 --- a/cli/tests/unit/dispatch_bin_test.ts +++ b/cli/tests/unit/dispatch_bin_test.ts @@ -1,27 +1,16 @@ -import { - assert, - assertEquals, - assertMatch, - unitTest, - unreachable, -} from "./test_util.ts"; +import { assertStringIncludes, unitTest, unreachable } from "./test_util.ts"; -const readErrorStackPattern = new RegExp( - `^.* - at processErr \\(.*core\\.js:.*\\) - at opAsyncHandler \\(.*core\\.js:.*\\) - at handleAsyncMsgFromRust \\(.*core\\.js:.*\\).*$`, - "ms", -); - -unitTest(async function sendAsyncStackTrace(): Promise<void> { +unitTest(async function sendAsyncStackTrace() { const buf = new Uint8Array(10); const rid = 10; try { await Deno.read(rid, buf); unreachable(); } catch (error) { - assertMatch(error.stack, readErrorStackPattern); + const s = error.stack.toString(); + console.log(s); + assertStringIncludes(s, "dispatch_bin_test.ts"); + assertStringIncludes(s, "read"); } }); |