nested.js
This file
Path
test/fixtures/nested.js
28 lines · 575 bytes · JavaScript
Last changed by
Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
History of this fileTake it
The walk stopped after 200 commits: lines older than 9f65b86 point at it.
100% test coverage (#1018)ehmickybefore adoption9f65b86
line 1why, one step back1#!/usr/bin/env nodeRefactor test helpers for the `verbose` option (#1128)ehmickybefore adoption18d320f
lines 2–7why, one step back2import {3 execa,4 execaSync,5 getOneMessage,6 sendMessage,7} from '../../index.js';Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
line 8why, one step back8import {getNestedOptions} from '../helpers/nested.js';100% test coverage (#1018)ehmickybefore adoption9f65b86
line 9why, one step back9Refactor test helpers for the `verbose` option (#1128)ehmickybefore adoption18d320f
lines 10–18why, one step back10const {11 isSync,12 file,13 commandArguments,14 options,15 optionsFixture,16 optionsInput,17} = await getOneMessage();18Allow `verbose` option to be a function for custom logging (#1130)ehmickybefore adoption8daf348
line 19why, one step back19const commandOptions = await getNestedOptions(options, optionsFixture, optionsInput);Refactor test helpers for the `verbose` option (#1128)ehmickybefore adoption18d320f
line 20why, one step back20100% test coverage (#1018)ehmickybefore adoption9f65b86
line 21why, one step back21try {Refactor test helpers for the `verbose` option (#1128)ehmickybefore adoption18d320f
lines 22–25why, one step back22 const result = isSync23 ? execaSync(file, commandArguments, commandOptions)24 : await execa(file, commandArguments, commandOptions);25 await sendMessage(result);100% test coverage (#1018)ehmickybefore adoption9f65b86
line 26why, one step back26} catch (error) {Refactor test helpers for the `verbose` option (#1128)ehmickybefore adoption18d320f
line 27why, one step back27 await sendMessage(error);100% test coverage (#1018)ehmickybefore adoption9f65b86
line 28why, one step back28}