diff --git a/tests/cli/tmp.test.js b/tests/cli/tmp.test.js index e151eec2..05d98ad8 100644 --- a/tests/cli/tmp.test.js +++ b/tests/cli/tmp.test.js @@ -1,5 +1,6 @@ import { describe, it } from 'node:test'; import * as assert from "node:assert"; +import { exec } from "node:child_process" /** * TODO: Testing nodejs - dummy file to be removed again! @@ -10,4 +11,13 @@ describe('TODO', () => { assert.ok(true); }); + it('can invoke cli application via npx', async () => { + return exec('npx ion', (error, stdout,stderr) => { + // console.log('stdout', stdout); + // console.error('stderr', stderr); + // console.log('code', error.code); + + assert.equal(error.code, 1, `Incorrect exit code: (${error.code})`); + }); + }); }); \ No newline at end of file