Skip to content

Commit

Permalink
fix: exit code check
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 20, 2018
1 parent 353e912 commit c9d0910
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"devDependencies": {
"@dxcli/dev-semantic-release": "^0.0.3",
"@dxcli/dev-tslint": "^0.0.15",
"@dxcli/version": "^0.1.2",
"@dxcli/version": "^0.1.3",
"@types/node": "^9.3.0",
"cross-env": "^5.1.3",
"eslint": "^4.16.0",
Expand Down
4 changes: 2 additions & 2 deletions src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const testCommand = (args: string[], opts: TestCommandOptions) => {
await run(args, {root: opts.root || module.parent!.parent!.filename})
} catch (err) {
if (err.code !== 'EEXIT') throw err
if (err['cli-ux'].exitCode !== exit) {
throw new Error(`Expected exit code to be ${exit} but got ${err['cli-ux'].exitCode}`)
if (err['cli-ux'].exit !== exit) {
throw new Error(`Expected exit code to be ${exit} but got ${err['cli-ux'].exit}`)
}
}
if (opts.stdout) expect(output.stdout).to.equal(opts.stdout)
Expand Down
30 changes: 15 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@
dependencies:
find-up "^2.1.0"

"@dxcli/command@^0.1.10", "@dxcli/command@^0.1.9":
version "0.1.10"
resolved "https://registry.yarnpkg.com/@dxcli/command/-/command-0.1.10.tgz#cb5805ca3fe1d7af59af653c96388c9df64f25cc"
"@dxcli/command@^0.1.10":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@dxcli/command/-/command-0.1.11.tgz#47337cb261e563a372d2a6d02676000a204b7be1"
dependencies:
"@dxcli/config" "^0.1.18"
"@dxcli/config" "^0.1.20"
"@dxcli/parser" "^0.0.2"
"@dxcli/screen" "^0.0.0"
cli-ux "^3.1.2"
cli-ux "^3.1.3"
debug "^3.1.0"
http-call "^5.0.1"

"@dxcli/config@^0.1.17", "@dxcli/config@^0.1.18", "@dxcli/config@^0.1.20":
"@dxcli/config@^0.1.20":
version "0.1.20"
resolved "https://registry.yarnpkg.com/@dxcli/config/-/config-0.1.20.tgz#e344d15818876663505ef7adbf71afb23a89323b"
dependencies:
Expand Down Expand Up @@ -201,13 +201,13 @@
version "0.0.0"
resolved "https://registry.yarnpkg.com/@dxcli/screen/-/screen-0.0.0.tgz#a85f69bfb00d3961656bad5d7b12f8e603c7ce09"

"@dxcli/version@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@dxcli/version/-/version-0.1.2.tgz#21891976cd57be55bf99d85388d959483d023ea8"
"@dxcli/version@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@dxcli/version/-/version-0.1.3.tgz#031a0d19346b41f00794d2cf4cf972183572383c"
dependencies:
"@dxcli/command" "^0.1.9"
"@dxcli/config" "^0.1.17"
cli-ux "^3.1.0"
"@dxcli/command" "^0.1.10"
"@dxcli/config" "^0.1.20"
cli-ux "^3.1.2"

"@heroku-cli/color@^1.0.4":
version "1.1.1"
Expand Down Expand Up @@ -934,9 +934,9 @@ cli-ux@^2.0.21:
supports-color "^5.1.0"
ts-lodash "^4.0.8"

cli-ux@^3.1.0, cli-ux@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.1.2.tgz#4a273fbb24ad2390d653f1a12c047c4f39deb810"
cli-ux@^3.1.2, cli-ux@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/cli-ux/-/cli-ux-3.1.3.tgz#2ec39244aacc636ca329443884e4c5f825b796d8"
dependencies:
"@dxcli/screen" "^0.0.0"
"@heroku/linewrap" "^1.0.0"
Expand Down

0 comments on commit c9d0910

Please sign in to comment.