diff --git a/src/Reporter.tsx b/src/Reporter.tsx
index efcfc9d..e1e08ed 100644
--- a/src/Reporter.tsx
+++ b/src/Reporter.tsx
@@ -82,31 +82,42 @@ const FailureMessage: React.FC<{
const CompletedTests: React.FC<{
completedTests: State['completedTests'];
globalConfig: Config.GlobalConfig;
-}> = ({ completedTests, globalConfig }) => {
+ summary: React.ReactElement;
+ PostMessage: () => React.ReactElement;
+ done: boolean;
+}> = ({ completedTests, globalConfig, summary, PostMessage, done }) => {
if (completedTests.length === 0) {
return null;
}
const didUpdate = globalConfig.updateSnapshot === 'all';
+ let testOutputs = completedTests.map(({ testResult, config }) => (
+
+
+
+
+
+
+ ));
+
+ if (done) {
+ testOutputs = testOutputs.concat(
+
+ {summary}
+ ,
+
+
+ ,
+ );
+ }
+
return (
-
- {completedTests.map(({ testResult, config }) => (
-
-
-
-
-
-
- ))}
-
+ {testOutputs}
);
};
@@ -236,29 +247,34 @@ const Reporter: React.FC = ({
const { exit } = useApp();
React.useEffect(() => {
if (done) {
- exit();
+ setImmediate(exit);
}
}, [done, exit]);
+ const summary = (
+
+ );
return (
-
- (
+
+ )}
/>
- {done ? (
-
- ) : null}
+
+ {done ? null : summary}
);
};