Skip to content

Commit

Permalink
fix(test): repair integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sQVe committed Apr 11, 2019
1 parent 51699f0 commit a6d790a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/integration/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Cli help option should print help page 1`] = `
"Usage: index [options] [command]
"Usage: 30s [options] [command]
Options:
-V, --version output the version number
Expand All @@ -24,7 +24,7 @@ Examples:
`;

exports[`Cli help option should print help page 2`] = `
"Usage: index [options] [command]
"Usage: 30s [options] [command]
Options:
-V, --version output the version number
Expand Down
4 changes: 3 additions & 1 deletion test/integration/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { spawnSync } from 'child_process'

import { version } from '../../package.json'

const cliPath = path.resolve(__dirname, '../../lib/30s.js')

const callCli = (...args) =>
spawnSync(path.resolve(__dirname, '../../lib/index.js'), args)
spawnSync('node', [cliPath, ...args])
.stdout.toString()
.trim()
const commands = ['search', 'view', 'tag']
Expand Down

0 comments on commit a6d790a

Please sign in to comment.