reject.js
This file
Path
test/return/reject.js
16 lines · 529 bytes · JavaScript
Last changed by
TweaksSindre Sorhusbefore adoption698a1b8
History of this fileTake it
The walk stopped after 200 commits: lines older than 9f65b86 point at it.
TweaksSindre Sorhusbefore adoption698a1b8
lines 1–2why, one step back1import assert from 'node:assert/strict';2import test from 'node:test';100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 3–7why, one step back3import {execa, execaSync} from '../../index.js';4import {setFixtureDirectory} from '../helpers/fixtures-directory.js';56setFixtureDirectory();7TweaksSindre Sorhusbefore adoption698a1b8
line 8why, one step back8test('skip throwing when using reject option', async () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 9why, one step back9 const {exitCode} = await execa('fail.js', {reject: false});TweaksSindre Sorhusbefore adoption698a1b8
line 10why, one step back10 assert.equal(exitCode, 2);100% test coverage (#1018)ehmickybefore adoption9f65b86
lines 11–12why, one step back11});12TweaksSindre Sorhusbefore adoption698a1b8
line 13why, one step back13test('skip throwing when using reject option in sync mode', () => {100% test coverage (#1018)ehmickybefore adoption9f65b86
line 14why, one step back14 const {exitCode} = execaSync('fail.js', {reject: false});TweaksSindre Sorhusbefore adoption698a1b8
line 15why, one step back15 assert.equal(exitCode, 2);100% test coverage (#1018)ehmickybefore adoption9f65b86
line 16why, one step back16});