MCPcopy Index your code
hub / github.com/react/react / normalizeError

Function normalizeError

packages/react-dom/src/__tests__/ReactRenderDocument-test.js:31–38  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

29}
30
31function normalizeError(msg) {
32 // Take the first sentence to make it easier to assert on.
33 const idx = msg.indexOf('.');
34 if (idx > -1) {
35 return msg.slice(0, idx + 1);
36 }
37 return msg;
38}
39
40describe('rendering React components at document', () => {
41 beforeEach(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected