MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / shouldExist

Function shouldExist

test/utils.ts:104–108  ·  view source on GitHub ↗
(value: T, message?: string)

Source from the content-addressed store, hash-verified

102// a = null;
103// shouldExist(a); /* throws should.exist assertion
104export function shouldExist<T>(value: T, message?: string): value is Exclude<T, null | undefined> {
105 // TODO: if the message is set we should have a proper message here; since the move to vitest we lost it.
106 expect(value).toEqual(expect.anything());
107 return true;
108}
109
110/***
111 * Absolute path to the root of the tests

Callers 1

analysis-tests.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected