frontend/.pnpm-store/v3/files/39/2b223142717402ef6840c37eaefc17c494d28476446f572360ce5cc06b4c64383d122f8239fe87a33ac0394a3a139b06c7af5cac18f2be782f19d9f81f9dd8

21 lines
533 B
Plaintext

import test from 'ava';
import mockStdIo from 'mock-stdio';
import { version, help } from '../lib/cli.js';
import { readJSON } from '../lib/util.js';
const pkg = readJSON(new URL('../package.json', import.meta.url));
test('should print version', t => {
mockStdIo.start();
version();
const { stdout } = mockStdIo.end();
t.is(stdout, `v${pkg.version}\n`);
});
test('should print help', t => {
mockStdIo.start();
help();
const { stdout } = mockStdIo.end();
t.regex(stdout, RegExp(`Release It!.+${pkg.version}`));
});