std/expect/_assertion.ts
eryue0220 6a4eb6cb91
fix(expect): support expect.hasAssertions() (#5901)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-09-19 14:38:32 +09:00

14 lines
357 B
TypeScript

// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { getAssertionState } from "@std/internal/assertion-state";
const assertionState = getAssertionState();
export function hasAssertions() {
assertionState.setAssertionCheck(true);
}
export function emitAssertionTrigger() {
assertionState.setAssertionTriggered(true);
}