| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6f3587c commit 31d89c4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -106,7 +106,7 @@ async function testRunnerWatch({ | |||
| 106 | 106 | child.stdout.on('data', (data) => { | |
| 107 | 107 | stdout += data.toString(); | |
| 108 | 108 | currentRun += data.toString(); | |
| 109 | - const testRuns = stdout.match(/duration_ms\s\d+/g); | ||
| 109 | + const testRuns = stdout.match(/^\S+ duration_ms\s\d+/gm); | ||
| 110 | 110 | if (testRuns?.length >= 1) ran1.resolve(); | |
| 111 | 111 | if (testRuns?.length >= 2) ran2.resolve(); | |
| 112 | 112 | }); | |
@@ -118,18 +118,11 @@ async function testRunnerWatch({ | |||
| 118 | 118 | const content = fixtureContent[fileToUpdate]; | |
| 119 | 119 | const path = fixturePaths[fileToUpdate]; | |
| 120 | 120 | ||
| 121 | - if (useRunApi) { | ||
| 122 | - const interval = setInterval( | ||
| 123 | - () => writeFileSync(path, content), | ||
| 124 | - common.platformTimeout(1000), | ||
| 125 | - ); | ||
| 126 | - await ran2.promise; | ||
| 127 | - clearInterval(interval); | ||
| 128 | - } else { | ||
| 129 | - writeFileSync(path, content); | ||
| 130 | - await setTimeout(common.platformTimeout(1000)); | ||
| 131 | - await ran2.promise; | ||
| 132 | - } | ||
| 121 | + await performFileOperation( | ||
| 122 | + () => writeFileSync(path, content), | ||
| 123 | + useRunApi, | ||
| 124 | + ); | ||
| 125 | + await ran2.promise; | ||
| 133 | 126 | ||
| 134 | 127 | runs.push(currentRun); | |
| 135 | 128 | child.kill(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments