diff --git a/packages/create-dapp/test/test-sanity.js b/packages/create-dapp/test/test-sanity.js new file mode 100644 index 000000000000..f4424d587686 --- /dev/null +++ b/packages/create-dapp/test/test-sanity.js @@ -0,0 +1,18 @@ +import test from 'ava'; +import { spawnSync } from 'child_process'; +import { fileURLToPath } from 'url'; + +const binname = fileURLToPath( + new URL('../src/create-dapp.js', import.meta.url), +); + +test('sanity', async t => { + await null; + const myMain = args => { + return spawnSync(binname, args, { stdio: 'ignore' }).status; + }; + + t.is(await myMain(['--help']), 0, '--help exits zero'); + t.is(await myMain(['--version']), 0, '--version exits zero'); + t.is(await myMain(['--zorgar']), 1, 'unknown flag fails'); +}); diff --git a/packages/create-dapp/test/test-stub.js b/packages/create-dapp/test/test-stub.js deleted file mode 100644 index 4a05abe39764..000000000000 --- a/packages/create-dapp/test/test-stub.js +++ /dev/null @@ -1,3 +0,0 @@ -import test from 'ava'; - -test.todo('write some tests');