Home / Function/ test() — react Function Reference

test() — react Function Reference

Architecture documentation for the test() function in storeSerializer.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  1490c420_4ae9_29f6_c382_8be661219ced["test()"]
  9037d74d_4f7d_686e_7d33_d5d377061256["storeSerializer.js"]
  1490c420_4ae9_29f6_c382_8be661219ced -->|defined in| 9037d74d_4f7d_686e_7d33_d5d377061256
  style 1490c420_4ae9_29f6_c382_8be661219ced fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/__tests__/__serializers__/storeSerializer.js lines 4–12

export function test(maybeStore) {
  // It's important to lazy-require the Store rather than imported at the head of the module.
  // Because we reset modules between tests, different Store implementations will be used for each test.
  // Unfortunately Jest does not reset its own serializer modules.
  return (
    maybeStore instanceof
    require('react-devtools-shared/src/devtools/store').default
  );
}

Domain

Subdomains

Frequently Asked Questions

What does test() do?
test() is a function in the react codebase, defined in packages/react-devtools-shared/src/__tests__/__serializers__/storeSerializer.js.
Where is test() defined?
test() is defined in packages/react-devtools-shared/src/__tests__/__serializers__/storeSerializer.js at line 4.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free