awaitExpectToThrowFailure() — react Function Reference
Architecture documentation for the awaitExpectToThrowFailure() function in ReactInternalTestUtils-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD f7d654a0_2956_a9f7_f0c3_ff4a1bce87d3["awaitExpectToThrowFailure()"] 62c3ba7e_36ca_3521_b0c5_af9be7f443d1["ReactInternalTestUtils-test.js"] f7d654a0_2956_a9f7_f0c3_ff4a1bce87d3 -->|defined in| 62c3ba7e_36ca_3521_b0c5_af9be7f443d1 style f7d654a0_2956_a9f7_f0c3_ff4a1bce87d3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/internal-test-utils/__tests__/ReactInternalTestUtils-test.js lines 325–334
const awaitExpectToThrowFailure = async expectBlock => {
let caughtError;
try {
await expectBlock();
} catch (error) {
caughtError = error;
}
expect(caughtError).toBeDefined();
return stripAnsi(caughtError.message);
};
Domain
Subdomains
Source
Frequently Asked Questions
What does awaitExpectToThrowFailure() do?
awaitExpectToThrowFailure() is a function in the react codebase, defined in packages/internal-test-utils/__tests__/ReactInternalTestUtils-test.js.
Where is awaitExpectToThrowFailure() defined?
awaitExpectToThrowFailure() is defined in packages/internal-test-utils/__tests__/ReactInternalTestUtils-test.js at line 325.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free