All files / expect / _assertions.ts

100.00% Branches 0/0
50.00% Lines 6/12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
 
x101
 
x101
 
 
 
 
 
 
 
 
 
x101
x539
x539
x539
















// Copyright 2018-2025 the Deno authors. MIT license.

import { getAssertionState } from "@std/internal/assertion-state";

const assertionState = getAssertionState();

export function hasAssertions() {
  assertionState.setAssertionCheck(true);
}

export function assertions(num: number) {
  assertionState.setAssertionCount(num);
}

export function emitAssertionTrigger() {
  assertionState.setAssertionTriggered(true);
  assertionState.updateAssertionTriggerCount();
}