1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-22 15:06:54 -05:00
denoland-deno/cli/tests/unit/ref_unref_test.ts
Bartek Iwańczuk abd9610530
refactor: remove Deno.core (#16881)
This commit removes "Deno.core" namespace. It is strictly private API
that has no stability guarantees, we were supposed to remove it long time ago.

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-01-24 18:54:10 +01:00

12 lines
465 B
TypeScript

// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
import { assertNotEquals, execCode } from "./test_util.ts";
Deno.test("[unrefOp] unref'ing invalid ops does not have effects", async () => {
const [statusCode, _] = await execCode(`
Deno[Deno.internal].core.unrefOp(-1);
setTimeout(() => { throw new Error() }, 10)
`);
// Invalid unrefOp call doesn't affect exit condition of event loop
assertNotEquals(statusCode, 0);
});