Files
pwcli/__tests__/cli-integration.test.ts
T
724f3905ab Add command to fix templates (#21)
* add command to fix templates

* replaceAll and lint fixes

* fixed menu

* fix lint command and run it

* add basic error handling for listing of templates

* CR suggestions

---------

Co-authored-by: Arwid Thornström <arwidt@gmail.com>
2024-08-16 09:34:15 +02:00

17 lines
436 B
TypeScript

const { system, filesystem } = require('gluegun');
const src = filesystem.path(__dirname, '..');
const cli = async (cmd) =>
system.run('node ' + filesystem.path(src, 'bin', 'pwcli') + ` ${cmd}`);
test('outputs version', async () => {
const output = await cli('--version');
expect(output).toContain('0.0.1');
});
test('outputs help', async () => {
const output = await cli('--help');
expect(output).toContain('0.0.1');
});