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

Function runTest

packages/react/src/__tests__/ReactES6Class-test.js:55–60  ·  view source on GitHub ↗
(element, expectedTag, expectedClassName)

Source from the content-addressed store, hash-verified

53 });
54
55 function runTest(element, expectedTag, expectedClassName) {
56 ReactDOM.flushSync(() => root.render(element));
57 expect(container.firstChild).not.toBeNull();
58 expect(container.firstChild.tagName).toBe(expectedTag);
59 expect(container.firstChild.className).toBe(expectedClassName);
60 }
61
62 it('preserves the name of the class for use in error messages', () => {
63 class Foo extends React.Component {}

Callers 1

Calls 3

renderMethod · 0.65
toBeNullMethod · 0.65
toBeMethod · 0.65

Tested by

no test coverage detected