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

Function reject

test/core/test/snapshot-async.test.ts:6–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4 return Promise.resolve('foo')
5}
6function reject() {
7 return Promise.reject(new Error('foo'))
8}
9
10test('resolved inline', async () => {
11 await expect(resolve()).resolves.toMatchInlineSnapshot('"foo"')

Callers 14

dom.test.tsFile · 0.70
sendEventMessageFunction · 0.70
sendOnMessageFunction · 0.70
openMethod · 0.50
readMethod · 0.50
basic.test.tsFile · 0.50
waitForOutputMethod · 0.50

Calls 1

rejectMethod · 0.45

Tested by

no test coverage detected