Skip to content
Myr

testHelpers.js

This file

Path

tests/testHelpers.js

21 lines · 463 bytes · JavaScript

Last changed by

Switching to esm-only (#2464)John Geebefore adoptionf4bd470

History of this file

Take it

Switching to esm-only (#2464)John Geebefore adoptionf4bd470

line 1why, one step back
1import { Command } from '../index.js';

Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086

lines 2–11why, one step back
2
3/**4 * Create a Command configured for using in tests.5 *6 * Throws exceptions instead of calling process.exit (.exitOverride())7 * and output suppressed.8 *9 * @returns Command10 */11

Switching to esm-only (#2464)John Geebefore adoptionf4bd470

line 12why, one step back
12export function createTestCommand() {

Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086

lines 13–21why, one step back
13 const cmd = new Command();
14 cmd15 .exitOverride() // So we get exceptions instead of process.exit16 .configureOutput({17 writeOut: () => {},18 writeErr: () => {},19 });20 return cmd;21}