-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(cli): send report files to tmpdir (#2351)
* test(cli): separate scripts into unit and acceptance test runs * test(cli): send report files to tmpdir * test(cli): add back forgotten package.json tests
- Loading branch information
1 parent
e84cab1
commit 2894fc4
Showing
4 changed files
with
71 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
const tap = require('tap'); | ||
const { execute, deleteFile } = require('../cli/_helpers.js'); | ||
const path = require('path'); | ||
const { execute, returnTmpPath } = require('../cli/_helpers.js'); | ||
|
||
tap.test('If we report specifying output, no browser is opened', async (t) => { | ||
const outputFile = 'report.html'; | ||
const outputPath = path.resolve(__dirname, '..', '..', outputFile); | ||
const outputFilePath = returnTmpPath('report.html'); | ||
|
||
const [exitCode] = await execute([ | ||
'report', | ||
'--output', | ||
outputFile, | ||
outputFilePath, | ||
'test/scripts/report.json' | ||
]); | ||
|
||
t.ok(exitCode === 0 && deleteFile(outputPath)); | ||
t.ok(exitCode === 0); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters