MCPcopy Create free account
hub / github.com/dataform-co/dataform / assertNoThrow

Function assertNoThrow

core/utils_test.ts:38–43  ·  view source on GitHub ↗

* Asserts that the provided function does NOT throw any error.

(testFn: () => void)

Source from the content-addressed store, hash-verified

36 * Asserts that the provided function does NOT throw any error.
37 */
38function assertNoThrow(testFn: () => void) {
39 const error = getThrownError(testFn);
40 if (error) {
41 throw new Error(`Expected no error to be thrown, but caught: "${error.message}"`);
42 }
43}
44
45/**
46 * Asserts that the provided function throws an error with a specific message.

Callers 1

utils_test.tsFile · 0.85

Calls 1

getThrownErrorFunction · 0.85

Tested by

no test coverage detected