nyc/test/helpers/test-failure.js
raw| 1 | 'use strict' |
| 2 | |
| 3 | const runNYC = require('./run-nyc') |
| 4 | |
| 5 | async function testFailure (t, opts) { |
| 6 | const { status, stderr, stdout } = await runNYC({ |
| 7 | tempDir: t.tempDir, |
| 8 | ...opts |
| 9 | }) |
| 10 | |
| 11 | t.equal(status, 1) |
| 12 | t.matchSnapshot(stderr, 'stderr') |
| 13 | t.matchSnapshot(stdout, 'stdout') |
| 14 | } |
| 15 | |
| 16 | module.exports = testFailure |