MCPcopy Index your code
hub / github.com/nodejs/node / fail

Function fail

deps/v8/test/intl/assert.js:101–106  ·  view source on GitHub ↗

* Throws an exception containing the user_message (if any) and the values.

(expected, found, user_message = '')

Source from the content-addressed store, hash-verified

99 * Throws an exception containing the user_message (if any) and the values.
100 */
101function fail(expected, found, user_message = '') {
102 // TODO(cira): Replace String with PrettyPrint for objects and arrays.
103 var message = 'Failure' + (user_message ? ' (' + user_message + ')' : '') +
104 ': expected <' + String(expected) + '>, found <' + String(found) + '>.';
105 throw new Error(message);
106}
107
108
109/**

Callers 10

assertEqualsFunction · 0.70
assertNotNullFunction · 0.70
assertNotUndefinedFunction · 0.70
assertThrowsFunction · 0.70
assertDoesNotThrowFunction · 0.70
assertLanguageTagFunction · 0.70
assertListFormatFunction · 0.50
assertListFormatFunction · 0.50
toStringMethod · 0.50
Promise-resolve.jsFile · 0.50

Calls 1

StringClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…