Home / Function/ test() — react Function Reference

test() — react Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  6f2fdce1_e0c6_62a6_9cd9_be1279c730da["test()"]
  88b54546_7e9a_9f5d_1ea3_11350e7b725e["profilingSerializer.js"]
  6f2fdce1_e0c6_62a6_9cd9_be1279c730da -->|defined in| 88b54546_7e9a_9f5d_1ea3_11350e7b725e
  style 6f2fdce1_e0c6_62a6_9cd9_be1279c730da fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/react-devtools-shared/src/__tests__/__serializers__/profilingSerializer.js lines 6–17

export function test(maybeProfile) {
  if (
    maybeProfile != null &&
    typeof maybeProfile === 'object' &&
    hasOwnProperty.call(maybeProfile, 'reactVersion') &&
    maybeProfile.reactVersion !== FILTERED_VERSION_STRING
  ) {
    return true;
  }

  return false;
}

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__/profilingSerializer.js.
Where is test() defined?
test() is defined in packages/react-devtools-shared/src/__tests__/__serializers__/profilingSerializer.js at line 6.

Analyze Your Own Codebase

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

Try Supermodel Free