diff --git a/cli/tauri.js/test/jest/__tests__/tauri.spec.js b/cli/tauri.js/test/jest/__tests__/tauri.spec.js index 6d7b3107c..7bb84868b 100644 --- a/cli/tauri.js/test/jest/__tests__/tauri.spec.js +++ b/cli/tauri.js/test/jest/__tests__/tauri.spec.js @@ -33,8 +33,21 @@ describe('[CLI] tauri.js', () => { }) it('gets you help', async () => { jest.spyOn(console, 'log') - tauri(['icon']) - expect(!!console.log.mock.calls[0][0]).toBe(true) - jest.clearAllMocks() + const tests = ['--help', '-h', 'invalid command'] + for (const test of tests) { + tauri([test]) + expect(!!console.log.mock.calls[0][0]).toBe(true) + jest.clearAllMocks() + } + }) + it('gets you version', async () => { + jest.spyOn(console, 'log') + const tests = ['--version', '-v'] + const version = require('../../../package.json').version + for (const test of tests) { + tauri([test]) + expect(console.log.mock.calls[0][0]).toBe(version) + jest.clearAllMocks() + } }) })