Home / Function/ parseFailingTests() — react Function Reference

parseFailingTests() — react Function Reference

Architecture documentation for the parseFailingTests() function in enable-feature-flag.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  c83f450b_4a22_69d3_6045_9e51a0d7225e["parseFailingTests()"]
  fdb06a3a_b735_af93_2b10_31380c21c8b7["enable-feature-flag.js"]
  c83f450b_4a22_69d3_6045_9e51a0d7225e -->|defined in| fdb06a3a_b735_af93_2b10_31380c21c8b7
  8b10b33c_dacb_5e2f_27fa_87868d6869cc["verifyAllTestsPass()"]
  8b10b33c_dacb_5e2f_27fa_87868d6869cc -->|calls| c83f450b_4a22_69d3_6045_9e51a0d7225e
  ab68ec04_512e_f89e_9e49_ae73608023f0["main()"]
  ab68ec04_512e_f89e_9e49_ae73608023f0 -->|calls| c83f450b_4a22_69d3_6045_9e51a0d7225e
  style c83f450b_4a22_69d3_6045_9e51a0d7225e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

compiler/scripts/enable-feature-flag.js lines 135–153

function parseFailingTests(output) {
  const failingTests = [];

  // Look for lines that contain "FAIL:" followed by the test name
  // Format: "FAIL: test-name" or with ANSI codes
  const lines = output.split('\n');
  for (const line of lines) {
    // Remove ANSI codes for easier parsing
    const cleanLine = line.replace(/\x1b\[[0-9;]*m/g, '');

    // Match "FAIL: test-name"
    const match = cleanLine.match(/^FAIL:\s*(.+)$/);
    if (match) {
      failingTests.push(match[1].trim());
    }
  }

  return failingTests;
}

Domain

Subdomains

Frequently Asked Questions

What does parseFailingTests() do?
parseFailingTests() is a function in the react codebase, defined in compiler/scripts/enable-feature-flag.js.
Where is parseFailingTests() defined?
parseFailingTests() is defined in compiler/scripts/enable-feature-flag.js at line 135.
What calls parseFailingTests()?
parseFailingTests() is called by 2 function(s): main, verifyAllTestsPass.

Analyze Your Own Codebase

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

Try Supermodel Free