feat(core): cleaner opcall stack traces (#12358)

This commit is contained in:
Aaron O'Mullan 2021-10-07 18:39:27 +02:00 committed by GitHub
parent ab2e0a465e
commit 370c27e09a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 7 deletions

View file

@ -1,4 +1,9 @@
import { assertStringIncludes, unitTest, unreachable } from "./test_util.ts";
import {
assert,
assertStringIncludes,
unitTest,
unreachable,
} from "./test_util.ts";
unitTest(async function sendAsyncStackTrace() {
const buf = new Uint8Array(10);
@ -11,6 +16,10 @@ unitTest(async function sendAsyncStackTrace() {
console.log(s);
assertStringIncludes(s, "opcall_test.ts");
assertStringIncludes(s, "read");
assert(
!s.includes("deno:core"),
"opcall stack traces should NOT include deno:core internals such as unwrapOpResult",
);
}
});