| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7d9e994 commit b5eb24c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,8 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) { | |||
| 41 | 41 | const ran1 = util.createDeferredPromise(); | |
| 42 | 42 | const ran2 = util.createDeferredPromise(); | |
| 43 | 43 | const child = spawn(process.execPath, | |
| 44 | - ['--watch', '--test', file ? fixturePaths[file] : undefined].filter(Boolean), | ||
| 44 | + ['--watch', '--test', '--test-reporter=spec', | ||
| 45 | + file ? fixturePaths[file] : undefined].filter(Boolean), | ||
| 45 | 46 | { encoding: 'utf8', stdio: 'pipe', cwd: tmpdir.path }); | |
| 46 | 47 | let stdout = ''; | |
| 47 | 48 | let currentRun = ''; | |
@@ -50,7 +51,7 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) { | |||
| 50 | 51 | child.stdout.on('data', (data) => { | |
| 51 | 52 | stdout += data.toString(); | |
| 52 | 53 | currentRun += data.toString(); | |
| 53 | - const testRuns = stdout.match(/# duration_ms\s\d+/g); | ||
| 54 | + const testRuns = stdout.match(/duration_ms\s\d+/g); | ||
| 54 | 55 | if (testRuns?.length >= 1) ran1.resolve(); | |
| 55 | 56 | if (testRuns?.length >= 2) ran2.resolve(); | |
| 56 | 57 | }); | |
@@ -71,10 +72,10 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) { | |||
| 71 | 72 | assert.strictEqual(runs.length, 2); | |
| 72 | 73 | ||
| 73 | 74 | for (const run of runs) { | |
| 74 | - assert.match(run, /# tests 1/); | ||
| 75 | - assert.match(run, /# pass 1/); | ||
| 76 | - assert.match(run, /# fail 0/); | ||
| 77 | - assert.match(run, /# cancelled 0/); | ||
| 75 | + assert.match(run, /tests 1/); | ||
| 76 | + assert.match(run, /pass 1/); | ||
| 77 | + assert.match(run, /fail 0/); | ||
| 78 | + assert.match(run, /cancelled 0/); | ||
| 78 | 79 | } | |
| 79 | 80 | }; | |
| 80 | 81 | ||
@@ -94,10 +95,10 @@ async function testWatch({ fileToUpdate, file, action = 'update' }) { | |||
| 94 | 95 | assert.strictEqual(runs.length, 2); | |
| 95 | 96 | ||
| 96 | 97 | for (const run of runs) { | |
| 97 | - assert.match(run, /# tests 1/); | ||
| 98 | - assert.match(run, /# pass 1/); | ||
| 99 | - assert.match(run, /# fail 0/); | ||
| 100 | - assert.match(run, /# cancelled 0/); | ||
| 98 | + assert.match(run, /tests 1/); | ||
| 99 | + assert.match(run, /pass 1/); | ||
| 100 | + assert.match(run, /fail 0/); | ||
| 101 | + assert.match(run, /cancelled 0/); | ||
| 101 | 102 | } | |
| 102 | 103 | }; | |
| 103 | 104 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments