TestFailureDetails.fromSecondaryMessage constructor
TestFailureDetails.fromSecondaryMessage(
- String text
Classifies a non-primary kernel diagnostic without treating it as the test's assertion failure.
Implementation
factory TestFailureDetails.fromSecondaryMessage(String text) {
if (text.startsWith('Runtime close failed:')) {
return TestFailureDetails(
kind: TestFailureKind.cleanup,
message: text,
phase: 'cleanup',
);
}
if (text.startsWith('Event subscriber ')) {
return TestFailureDetails(
kind: TestFailureKind.internal,
message: text,
phase: 'reporting',
);
}
return TestFailureDetails.fromMessage(text, phase: 'secondary');
}