MCPcopy
hub / github.com/facebook/react / throwFormattedError

Function throwFormattedError

packages/internal-test-utils/consoleMock.js:209–217  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

207 if (__DEV__) {
208 // eslint-disable-next-line no-inner-declarations
209 function throwFormattedError(message) {
210 const error = new Error(
211 `${chalk.dim(matcherName)}(${chalk.red(
212 'expected',
213 )})\n\n${message.trim()}`,
214 );
215 Error.captureStackTrace(error, assertConsoleLog);
216 throw error;
217 }
218
219 // Warn about incorrect usage first arg.
220 if (!Array.isArray(expectedMessages)) {

Callers 1

createLogAssertionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected