MCPcopy
hub / github.com/vitest-dev/vitest / getError

Function getError

test/core/test/wasm.test.ts:66–74  ·  view source on GitHub ↗
(f: () => unknown)

Source from the content-addressed store, hash-verified

64})
65
66async function getError(f: () => unknown) {
67 try {
68 await f()
69 }
70 catch (e) {
71 return e
72 }
73 expect.unreachable()
74}
75
76test('supports wasm/js cyclic import (old wasm-bindgen output)', async () => {
77 globalThis.alert = vi.fn()

Callers 1

wasm.test.tsFile · 0.70

Calls 1

fFunction · 0.50

Tested by

no test coverage detected