validate() — react Function Reference
Architecture documentation for the validate() function in test-packaging-fixture.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD dbb3a8e1_cbaa_5d6a_cbab_2557acc6e740["validate()"] d3da9d25_064f_bc58_95af_3d33b89b6cc8["test-packaging-fixture.js"] dbb3a8e1_cbaa_5d6a_cbab_2557acc6e740 -->|defined in| d3da9d25_064f_bc58_95af_3d33b89b6cc8 4d5d8e17_4bbe_e89e_c0ad_83bcbec2aff4["run()"] 4d5d8e17_4bbe_e89e_c0ad_83bcbec2aff4 -->|calls| dbb3a8e1_cbaa_5d6a_cbab_2557acc6e740 style dbb3a8e1_cbaa_5d6a_cbab_2557acc6e740 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
scripts/release/shared-commands/test-packaging-fixture.js lines 12–41
const validate = async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('http://localhost:9000/fixtures/packaging');
try {
return await page.evaluate(() => {
const iframes = document.querySelectorAll('iframe');
if (iframes.length === 0) {
return 'No iframes were found.';
}
for (let i = 0; i < iframes.length; i++) {
const iframe = iframes[i];
// Don't include the <script> Babel tag
const container =
iframe.contentDocument.body.getElementsByTagName('div')[0];
if (container.textContent !== 'Hello World!') {
return `Unexpected fixture content, "${container.textContent}"`;
}
}
return null;
});
} finally {
await browser.close();
}
};
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does validate() do?
validate() is a function in the react codebase, defined in scripts/release/shared-commands/test-packaging-fixture.js.
Where is validate() defined?
validate() is defined in scripts/release/shared-commands/test-packaging-fixture.js at line 12.
What calls validate()?
validate() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free