mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
67a4231bb6
The format of the sanitizers will change a little bit: - If multiple async ops leak and traces are on, we repeat the async op header once per stack trace. - All leaks are aggregated under a "Leaks detected:" banner as the new timers are eventually going to be added, and these are neither ops nor resources. - `1 async op` is now `An async op` - If ops and resources leak, we show both (rather than op leaks masking resources) Follow-on to https://github.com/denoland/deno/pull/22226
17 lines
475 B
TypeScript
17 lines
475 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
const EXPECTED_OP_COUNT = 11;
|
|
|
|
Deno.test(function checkExposedOps() {
|
|
// @ts-ignore TS doesn't allow to index with symbol
|
|
const core = Deno[Deno.internal].core;
|
|
const opNames = Object.keys(core.ops);
|
|
|
|
if (opNames.length !== EXPECTED_OP_COUNT) {
|
|
throw new Error(
|
|
`Expected ${EXPECTED_OP_COUNT} ops, but got ${opNames.length}:\n${
|
|
opNames.join("\n")
|
|
}`,
|
|
);
|
|
}
|
|
});
|