Repository: infinitered/solidarity
Pull request #180 (2018-03-02 04:54:17)

:sparkles: Fixups for new version
Adding more tests, and improving error reporting.

TravisBuddy: ## Travis tests have failed
Hey **Gant**, 
Please read the following log in order to understand the failure reason. 
It'll be awesome if you fix what's wrong and commit the changes.


### Node.js: node

<details>
  <summary>
    <strong>
npm run test:ci
    </strong>
  </summary>

```
> solidarity@1.1.1 test:ci /home/travis/build/infinitered/solidarity
> jest --ci --runInBand && yarn test:extras

PASS __tests__/commands/snapshot.ts
PASS __tests__/command_helpers/checkRequirement.ts
PASS __tests__/command_helpers/updateRequirement.ts
PASS __tests__/command_helpers/reviewRule.ts
PASS __tests__/command_helpers/appendSolidaritySettings.ts
PASS __tests__/command_helpers/checkShell.ts
PASS __tests__/commands/solidarity.ts
PASS __tests__/command_helpers/checkRequirementPlugins.ts
FAIL __tests__/integration/solidarity-check/check-valid.ts (6.658s)
  ● default looks for .solidarity file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |   process.chdir(tempDir)
      24 |   try {
    > 25 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      26 |     done()
      27 |   } catch (err) {
      28 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:25:59)

  ● also looks for .solidarity.json file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      35 |   process.chdir(tempDir)
      36 |   try {
    > 37 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      38 |     done()
      39 |   } catch (err) {
      40 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:37:59)

  ● verbose flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --verbose",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --verbose",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      44 | test('verbose flag works', async done => {
      45 |   try {
    > 46 |     await execa(SOLIDARITY, ['--verbose']).then(result => expect(result).toMatchSnapshot())
      47 |     done()
      48 |   } catch (err) {
      49 |     const x = err
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:46:74)

  ● silent flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --silent",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --silent",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      54 | test('silent flag works', async done => {
      55 |   try {
    > 56 |     await execa(SOLIDARITY, ['--silent']).then(result => expect(result).toMatchSnapshot())
      57 |     done()
      58 |   } catch (err) {
      59 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:56:73)

 › 4 snapshot tests failed.
PASS __tests__/command_helpers/getSolidaritySettings.ts
PASS __tests__/command_helpers/getVersion.ts
PASS __tests__/command_helpers/checkCLIForUpdates.ts
PASS __tests__/command_helpers/quirksNodeModules.ts
PASS __tests__/command_helpers/printResults.ts
PASS __tests__/command_helpers/removeNonVersionCharacters.ts
PASS __tests__/command_helpers/updateVersions.ts
PASS __tests__/commands/create.ts
PASS __tests__/command_helpers/findPluginInfo.ts
PASS __tests__/command_helpers/getLineWithVersion.ts
PASS __tests__/integration/solidarity-report/report-basic.ts
PASS __tests__/command_helpers/checkCLI.ts
PASS __tests__/command_helpers/skipRule.ts
PASS __tests__/extensions/extensionCheck.ts
PASS __tests__/index.ts
PASS __tests__/commands/help.ts
PASS __tests__/command_helpers/checkENV.ts
PASS __tests__/command_helpers/checkDir.ts
FAIL __tests__/integration/solidarity-snapshot/snapshot-nada.ts
  ● solidarity report works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/bin/sh -c echo n | /Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity snapshot",
    +   "cmd": "/bin/sh -c echo n | /home/travis/build/infinitered/solidarity/bin/solidarity snapshot",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |     execa.shell(`echo n | ${SOLIDARITY} snapshot`).then(result => {
      24 |       // check a few from the report
    > 25 |       expect(result).toMatchSnapshot()
      26 |       expect(result.code).toBe(0)
      27 |       done()
      28 |     })
      
      at _execa2.default.shell.then.result (__tests__/integration/solidarity-snapshot/snapshot-nada.ts:25:22)

 › 1 snapshot test failed.
PASS __tests__/command_helpers/checkFile.ts
PASS __tests__/command_helpers/setSolidaritySettings.ts
PASS __tests__/command_helpers/solidarityReport.ts
PASS __tests__/integration/solidarity-check/check-invalid.ts
PASS __tests__/commands/report.ts
PASS __tests__/command_helpers/createPlugin.ts
PASS __tests__/docs/testDocs.ts
PASS __tests__/command_helpers/binaryExists.ts
PASS __tests__/schema/validateExampleSchema.ts

Summary of all failing tests
FAIL __tests__/integration/solidarity-check/check-valid.ts (6.658s)
  ● default looks for .solidarity file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |   process.chdir(tempDir)
      24 |   try {
    > 25 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      26 |     done()
      27 |   } catch (err) {
      28 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:25:59)

  ● also looks for .solidarity.json file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      35 |   process.chdir(tempDir)
      36 |   try {
    > 37 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      38 |     done()
      39 |   } catch (err) {
      40 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:37:59)

  ● verbose flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --verbose",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --verbose",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      44 | test('verbose flag works', async done => {
      45 |   try {
    > 46 |     await execa(SOLIDARITY, ['--verbose']).then(result => expect(result).toMatchSnapshot())
      47 |     done()
      48 |   } catch (err) {
      49 |     const x = err
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:46:74)

  ● silent flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --silent",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --silent",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      54 | test('silent flag works', async done => {
      55 |   try {
    > 56 |     await execa(SOLIDARITY, ['--silent']).then(result => expect(result).toMatchSnapshot())
      57 |     done()
      58 |   } catch (err) {
      59 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:56:73)

FAIL __tests__/integration/solidarity-snapshot/snapshot-nada.ts
  ● solidarity report works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/bin/sh -c echo n | /Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity snapshot",
    +   "cmd": "/bin/sh -c echo n | /home/travis/build/infinitered/solidarity/bin/solidarity snapshot",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |     execa.shell(`echo n | ${SOLIDARITY} snapshot`).then(result => {
      24 |       // check a few from the report
    > 25 |       expect(result).toMatchSnapshot()
      26 |       expect(result.code).toBe(0)
      27 |       done()
      28 |     })
      
      at _execa2.default.shell.then.result (__tests__/integration/solidarity-snapshot/snapshot-nada.ts:25:22)


Snapshot Summary
 › 5 snapshot tests failed in 2 test suites. Inspect your code changes or run `npm run test:ci -- -u` to update them.

Test Suites: 2 failed, 35 passed, 37 total
Tests:       5 failed, 155 passed, 160 total
Snapshots:   5 failed, 40 passed, 45 total
Time:        24.554s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! solidarity@1.1.1 test:ci: `jest --ci --runInBand && yarn test:extras`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the solidarity@1.1.1 test:ci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-03-02T04_55_41_708Z-debug.log
```
</details>
<br />

<details>
  <summary>
    <strong>
yarn danger ci
    </strong>
  </summary>

```
yarn run v1.3.2
$ /home/travis/build/infinitered/solidarity/node_modules/.bin/danger ci
You may have updated from Danger 2.x -> 3.x without updating from `danger` to `danger ci`.
No issues or messages were sent. Removing any existing messages.
Done in 2.68s.
```
</details>
<br />


### Node.js: 8

<details>
  <summary>
    <strong>
npm run test:ci
    </strong>
  </summary>

```
> solidarity@1.1.1 test:ci /home/travis/build/infinitered/solidarity
> jest --ci --runInBand && yarn test:extras

PASS __tests__/commands/snapshot.ts
PASS __tests__/command_helpers/checkRequirement.ts
PASS __tests__/command_helpers/updateRequirement.ts
PASS __tests__/command_helpers/reviewRule.ts
PASS __tests__/command_helpers/appendSolidaritySettings.ts
PASS __tests__/command_helpers/checkShell.ts
PASS __tests__/commands/solidarity.ts
PASS __tests__/command_helpers/checkRequirementPlugins.ts
FAIL __tests__/integration/solidarity-check/check-valid.ts (7.223s)
  ● default looks for .solidarity file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |   process.chdir(tempDir)
      24 |   try {
    > 25 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      26 |     done()
      27 |   } catch (err) {
      28 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:25:59)

  ● also looks for .solidarity.json file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      35 |   process.chdir(tempDir)
      36 |   try {
    > 37 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      38 |     done()
      39 |   } catch (err) {
      40 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:37:59)

  ● verbose flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --verbose",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --verbose",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      44 | test('verbose flag works', async done => {
      45 |   try {
    > 46 |     await execa(SOLIDARITY, ['--verbose']).then(result => expect(result).toMatchSnapshot())
      47 |     done()
      48 |   } catch (err) {
      49 |     const x = err
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:46:74)

  ● silent flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --silent",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --silent",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      54 | test('silent flag works', async done => {
      55 |   try {
    > 56 |     await execa(SOLIDARITY, ['--silent']).then(result => expect(result).toMatchSnapshot())
      57 |     done()
      58 |   } catch (err) {
      59 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:56:73)

 › 4 snapshot tests failed.
PASS __tests__/command_helpers/getSolidaritySettings.ts
PASS __tests__/command_helpers/getVersion.ts
PASS __tests__/command_helpers/checkCLIForUpdates.ts
PASS __tests__/command_helpers/quirksNodeModules.ts
PASS __tests__/command_helpers/printResults.ts
PASS __tests__/command_helpers/removeNonVersionCharacters.ts
PASS __tests__/command_helpers/updateVersions.ts
PASS __tests__/commands/create.ts
PASS __tests__/command_helpers/findPluginInfo.ts
PASS __tests__/command_helpers/getLineWithVersion.ts
PASS __tests__/integration/solidarity-report/report-basic.ts
PASS __tests__/command_helpers/checkCLI.ts
PASS __tests__/command_helpers/skipRule.ts
PASS __tests__/extensions/extensionCheck.ts
PASS __tests__/index.ts
PASS __tests__/commands/help.ts
PASS __tests__/command_helpers/checkENV.ts
PASS __tests__/command_helpers/checkDir.ts
FAIL __tests__/integration/solidarity-snapshot/snapshot-nada.ts
  ● solidarity report works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/bin/sh -c echo n | /Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity snapshot",
    +   "cmd": "/bin/sh -c echo n | /home/travis/build/infinitered/solidarity/bin/solidarity snapshot",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |     execa.shell(`echo n | ${SOLIDARITY} snapshot`).then(result => {
      24 |       // check a few from the report
    > 25 |       expect(result).toMatchSnapshot()
      26 |       expect(result.code).toBe(0)
      27 |       done()
      28 |     })
      
      at _execa2.default.shell.then.result (__tests__/integration/solidarity-snapshot/snapshot-nada.ts:25:22)

 › 1 snapshot test failed.
PASS __tests__/command_helpers/checkFile.ts
PASS __tests__/command_helpers/setSolidaritySettings.ts
PASS __tests__/command_helpers/solidarityReport.ts
PASS __tests__/integration/solidarity-check/check-invalid.ts
PASS __tests__/commands/report.ts
PASS __tests__/command_helpers/createPlugin.ts
PASS __tests__/docs/testDocs.ts
PASS __tests__/command_helpers/binaryExists.ts
PASS __tests__/schema/validateExampleSchema.ts

Summary of all failing tests
FAIL __tests__/integration/solidarity-check/check-valid.ts (7.223s)
  ● default looks for .solidarity file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |   process.chdir(tempDir)
      24 |   try {
    > 25 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      26 |     done()
      27 |   } catch (err) {
      28 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:25:59)

  ● also looks for .solidarity.json file

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      35 |   process.chdir(tempDir)
      36 |   try {
    > 37 |     await execa(SOLIDARITY).then(result => expect(result).toMatchSnapshot())
      38 |     done()
      39 |   } catch (err) {
      40 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:37:59)

  ● verbose flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --verbose",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --verbose",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      44 | test('verbose flag works', async done => {
      45 |   try {
    > 46 |     await execa(SOLIDARITY, ['--verbose']).then(result => expect(result).toMatchSnapshot())
      47 |     done()
      48 |   } catch (err) {
      49 |     const x = err
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:46:74)

  ● silent flag works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity --silent",
    +   "cmd": "/home/travis/build/infinitered/solidarity/bin/solidarity --silent",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      54 | test('silent flag works', async done => {
      55 |   try {
    > 56 |     await execa(SOLIDARITY, ['--silent']).then(result => expect(result).toMatchSnapshot())
      57 |     done()
      58 |   } catch (err) {
      59 |     done.fail()
      
      at then.result (__tests__/integration/solidarity-check/check-valid.ts:56:73)

FAIL __tests__/integration/solidarity-snapshot/snapshot-nada.ts
  ● solidarity report works

    expect(value).toMatchSnapshot()
    
    Received value does not match stored snapshot 1.
    
    - Snapshot
    + Received
    
    @@ -1,7 +1,7 @@
      Object {
    -   "cmd": "/bin/sh -c echo n | /Users/gantman/Documents/Projects/js/rn/node_packages/solidarity/bin/solidarity snapshot",
    +   "cmd": "/bin/sh -c echo n | /home/travis/build/infinitered/solidarity/bin/solidarity snapshot",
        "code": 0,
        "failed": false,
        "killed": false,
        "signal": null,
        "stderr": "",

      23 |     execa.shell(`echo n | ${SOLIDARITY} snapshot`).then(result => {
      24 |       // check a few from the report
    > 25 |       expect(result).toMatchSnapshot()
      26 |       expect(result.code).toBe(0)
      27 |       done()
      28 |     })
      
      at _execa2.default.shell.then.result (__tests__/integration/solidarity-snapshot/snapshot-nada.ts:25:22)


Snapshot Summary
 › 5 snapshot tests failed in 2 test suites. Inspect your code changes or run `npm run test:ci -- -u` to update them.

Test Suites: 2 failed, 35 passed, 37 total
Tests:       5 failed, 155 passed, 160 total
Snapshots:   5 failed, 40 passed, 45 total
Time:        34.624s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! solidarity@1.1.1 test:ci: `jest --ci --runInBand && yarn test:extras`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the solidarity@1.1.1 test:ci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-03-02T04_55_46_737Z-debug.log
```
</details>
<br />

<details>
  <summary>
    <strong>
yarn danger ci
    </strong>
  </summary>

```
yarn run v1.3.2
$ /home/travis/build/infinitered/solidarity/node_modules/.bin/danger ci
You may have updated from Danger 2.x -> 3.x without updating from `danger` to `danger ci`.
No issues or messages were sent. Removing any existing messages.
Done in 2.67s.
```
</details>
<br />


codecov[bot]: # [Codecov](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=h1) Report
> Merging [#180](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=desc) into [master](https://codecov.io/gh/infinitered/solidarity/commit/3b0cedef4747551d3e63108f6953fd64046c8bf7?src=pr&el=desc) will **decrease** coverage by `0.33%`.
> The diff coverage is `55.55%`.

[![Impacted file tree graph](https://codecov.io/gh/infinitered/solidarity/pull/180/graphs/tree.svg?height=150&width=650&token=eTjcyCooFB&src=pr)](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #180      +/-   ##
==========================================
- Coverage   82.47%   82.13%   -0.34%     
==========================================
  Files          33       33              
  Lines         622      627       +5     
  Branches      107      107              
==========================================
+ Hits          513      515       +2     
- Misses         70       73       +3     
  Partials       39       39
```


| [Impacted Files](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/extensions/functions/getVersion.ts](https://codecov.io/gh/infinitered/solidarity/pull/180/diff?src=pr&el=tree#diff-c3JjL2V4dGVuc2lvbnMvZnVuY3Rpb25zL2dldFZlcnNpb24udHM=) | `64.28% <0%> (ø)` | :arrow_up: |
| [...extensions/functions/removeNonVersionCharacters.ts](https://codecov.io/gh/infinitered/solidarity/pull/180/diff?src=pr&el=tree#diff-c3JjL2V4dGVuc2lvbnMvZnVuY3Rpb25zL3JlbW92ZU5vblZlcnNpb25DaGFyYWN0ZXJzLnRz) | `100% <100%> (ø)` | :arrow_up: |
| [src/extensions/functions/updateRequirement.ts](https://codecov.io/gh/infinitered/solidarity/pull/180/diff?src=pr&el=tree#diff-c3JjL2V4dGVuc2lvbnMvZnVuY3Rpb25zL3VwZGF0ZVJlcXVpcmVtZW50LnRz) | `84.78% <50%> (-3.59%)` | :arrow_down: |
| [src/extensions/functions/checkCLI.ts](https://codecov.io/gh/infinitered/solidarity/pull/180/diff?src=pr&el=tree#diff-c3JjL2V4dGVuc2lvbnMvZnVuY3Rpb25zL2NoZWNrQ0xJLnRz) | `87.5% <66.66%> (-5.36%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=footer). Last update [3b0cede...310bfa5](https://codecov.io/gh/infinitered/solidarity/pull/180?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

TravisBuddy: ## Travis tests have failed
Hey **Gant**, 
Please read the following log in order to understand the failure reason. 
It'll be awesome if you fix what's wrong and commit the changes.


### Node.js: node


### Node.js: 8

<details>
  <summary>
    <strong>
npm run test:ci
    </strong>
  </summary>

```
> solidarity@1.1.1 test:ci /home/travis/build/infinitered/solidarity
> jest --ci --runInBand && yarn test:extras

PASS __tests__/commands/snapshot.ts (16.698s)
PASS __tests__/command_helpers/checkRequirement.ts
PASS __tests__/command_helpers/updateRequirement.ts
PASS __tests__/command_helpers/reviewRule.ts
PASS __tests__/command_helpers/appendSolidaritySettings.ts
PASS __tests__/command_helpers/checkShell.ts
PASS __tests__/commands/solidarity.ts
PASS __tests__/command_helpers/checkRequirementPlugins.ts
PASS __tests__/integration/solidarity-check/check-valid.ts (20.73s)
PASS __tests__/command_helpers/getSolidaritySettings.ts
PASS __tests__/command_helpers/getVersion.ts
PASS __tests__/command_helpers/checkCLIForUpdates.ts
PASS __tests__/command_helpers/quirksNodeModules.ts
PASS __tests__/command_helpers/printResults.ts
PASS __tests__/command_helpers/removeNonVersionCharacters.ts
FAIL __tests__/integration/solidarity-report/report-basic.ts
  ● solidarity report works

    expect(received).toBeTruthy()
    
    Expected value to be truthy, instead received
      false

      29 |       expect(result.stdout.includes('CPU')).toBeTruthy()
      30 |       expect(result.stdout.includes('Report Info')).toBeTruthy()
    > 31 |       expect(result.stdout.includes('yarn')).toBeTruthy()
      32 |       expect(result.stdout.includes('node')).toBeTruthy()
      33 |       expect(result.code).toBe(0)
      34 |       done()
      
      at then.result (__tests__/integration/solidarity-report/report-basic.ts:31:46)

PASS __tests__/command_helpers/updateVersions.ts
PASS __tests__/commands/create.ts
PASS __tests__/command_helpers/findPluginInfo.ts
PASS __tests__/command_helpers/getLineWithVersion.ts
PASS __tests__/command_helpers/checkCLI.ts
PASS __tests__/command_helpers/skipRule.ts
PASS __tests__/extensions/extensionCheck.ts
PASS __tests__/index.ts
PASS __tests__/commands/help.ts
PASS __tests__/command_helpers/checkENV.ts
PASS __tests__/integration/solidarity-snapshot/snapshot-nada.ts (5.147s)
PASS __tests__/command_helpers/checkDir.ts
PASS __tests__/command_helpers/checkFile.ts
PASS __tests__/command_helpers/setSolidaritySettings.ts
PASS __tests__/integration/solidarity-check/check-invalid.ts
PASS __tests__/command_helpers/solidarityReport.ts
PASS __tests__/commands/report.ts
PASS __tests__/command_helpers/createPlugin.ts
PASS __tests__/docs/testDocs.ts
PASS __tests__/command_helpers/binaryExists.ts
PASS __tests__/schema/validateExampleSchema.ts

Summary of all failing tests
FAIL __tests__/integration/solidarity-report/report-basic.ts
  ● solidarity report works

    expect(received).toBeTruthy()
    
    Expected value to be truthy, instead received
      false

      29 |       expect(result.stdout.includes('CPU')).toBeTruthy()
      30 |       expect(result.stdout.includes('Report Info')).toBeTruthy()
    > 31 |       expect(result.stdout.includes('yarn')).toBeTruthy()
      32 |       expect(result.stdout.includes('node')).toBeTruthy()
      33 |       expect(result.code).toBe(0)
      34 |       done()
      
      at then.result (__tests__/integration/solidarity-report/report-basic.ts:31:46)


Test Suites: 1 failed, 36 passed, 37 total
Tests:       1 failed, 159 passed, 160 total
Snapshots:   45 passed, 45 total
Time:        93.136s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! solidarity@1.1.1 test:ci: `jest --ci --runInBand && yarn test:extras`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the solidarity@1.1.1 test:ci script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-03-02T05_35_54_501Z-debug.log
```
</details>
<br />

<details>
  <summary>
    <strong>
yarn danger ci
    </strong>
  </summary>

```
yarn run v1.3.2
$ /home/travis/build/infinitered/solidarity/node_modules/.bin/danger ci
You may have updated from Danger 2.x -> 3.x without updating from `danger` to `danger ci`.
No issues or messages were sent. Removing any existing messages.
Done in 7.26s.
```
</details>
<br />



Patch:
diff --git a/src/extensions/functions/checkCLI.ts b/src/extensions/functions/checkCLI.ts
index 80f7007..2807d87 100644
--- a/src/extensions/functions/checkCLI.ts
+++ b/src/extensions/functions/checkCLI.ts
@@ -15,7 +15,13 @@ module.exports = async (rule: CLIRule, context: SolidarityRunContext): Promise<s
     // ensure we have valid rule input
     if (!semver.validRange(rule.semver)) return `Invalid semver rule ${rule.semver}`
 
-    const binaryVersion = await solidarity.getVersion(rule, context)
+    let binaryVersion
+    try {
+      binaryVersion = await solidarity.getVersion(rule, context)
+    } catch (e) {
+      return e
+    }
+
     // pad zeros for any non-semver version systems (rules still work)
     let binarySemantic = binaryVersion
     while (binarySemantic.split('.').length < 3) {
diff --git a/src/extensions/functions/getVersion.ts b/src/extensions/functions/getVersion.ts
index bbab161..985172d 100644
--- a/src/extensions/functions/getVersion.ts
+++ b/src/extensions/functions/getVersion.ts
@@ -19,7 +19,7 @@ module.exports = async (rule: CLIRule, context: SolidarityRunContext): Promise<s
         try {
           versionOutput = await system.run(`${rule.binary} -version`)
         } catch (_e) {
-          throw ' No version identifier flag for this binary was found'
+          throw 'No version identifier flag for this binary was found'
         }
       }
     }
diff --git a/src/extensions/functions/removeNonVersionCharacters.ts b/src/extensions/functions/removeNonVersionCharacters.ts
index f71759a..f734821 100644
--- a/src/extensions/functions/removeNonVersionCharacters.ts
+++ b/src/extensions/functions/removeNonVersionCharacters.ts
@@ -6,6 +6,6 @@ module.exports = (rule: CLIRule, line: string): string => {
     const matchIndex = rule.matchIndex || 0
     return foundVersions[matchIndex]
   } else {
-    throw ` No version was detected from the output of the binary '${rule.binary}'`
+    throw `No version was detected from the output of the binary '${rule.binary}'`
   }
 }
diff --git a/src/extensions/functions/updateRequirement.ts b/src/extensions/functions/updateRequirement.ts
index ac11efe..9c4f842 100644
--- a/src/extensions/functions/updateRequirement.ts
+++ b/src/extensions/functions/updateRequirement.ts
@@ -25,7 +25,13 @@ module.exports = async (
       // Handle CLI rule update
       case 'cli':
         if (!rule.semver) return []
-        const updateResult = await checkCLIForUpdates(rule, context)
+        let updateResult
+        try {
+          updateResult = await checkCLIForUpdates(rule, context)
+        } catch (e) {
+          spinner.fail(e)
+          return []
+        }
         const lineMessage = rule.line ? ` line ${rule.line} at` : ''
         ruleString = `Keep ${rule.binary}${lineMessage} ${rule.semver}`
         if (updateResult) {


Test patch:
diff --git a/__tests__/command_helpers/getVersion.ts b/__tests__/command_helpers/getVersion.ts
index 94e758d..a2ab5a5 100644
--- a/__tests__/command_helpers/getVersion.ts
+++ b/__tests__/command_helpers/getVersion.ts
@@ -43,6 +43,6 @@ describe('getVersion', () => {
     } catch (e) {
       result = e
     }
-    expect(result).toEqual(" No version was detected from the output of the binary 'ls'")
+    expect(result).toEqual("No version was detected from the output of the binary 'ls'")
   })
 })
diff --git a/__tests__/command_helpers/removeNonVersionCharacters.ts b/__tests__/command_helpers/removeNonVersionCharacters.ts
index 2aaaec9..77db01f 100644
--- a/__tests__/command_helpers/removeNonVersionCharacters.ts
+++ b/__tests__/command_helpers/removeNonVersionCharacters.ts
@@ -13,7 +13,7 @@ test('parse the result', () => {
 test('throws an error when there is no version output', () => {
   const line = 'Homebrew without versions'
   const rule = { binary: 'ls' }
-  const errorMessage = ` No version was detected from the output of the binary '${rule.binary}'`
+  const errorMessage = `No version was detected from the output of the binary '${rule.binary}'`
   expect(() => {
     removeNonVersionCharacters(rule, line)
   }).toThrowError(errorMessage)
diff --git a/__tests__/integration/solidarity-check/__snapshots__/check-valid.ts.snap b/__tests__/integration/solidarity-check/__snapshots__/check-valid.ts.snap
new file mode 100644
index 0000000..2077041
--- /dev/null
+++ b/__tests__/integration/solidarity-check/__snapshots__/check-valid.ts.snap
@@ -0,0 +1,18 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`also looks for .solidarity.json file 1`] = `
+"
+✔︎ Solidarity checks valid"
+`;
+
+exports[`default looks for .solidarity file 1`] = `
+"
+✔︎ Solidarity checks valid"
+`;
+
+exports[`silent flag works 1`] = `""`;
+
+exports[`verbose flag works 1`] = `
+"
+✔︎ Solidarity checks valid"
+`;
diff --git a/__tests__/integration/solidarity-check/check-invalid.ts b/__tests__/integration/solidarity-check/check-invalid.ts
index 95f178e..43002bc 100644
--- a/__tests__/integration/solidarity-check/check-invalid.ts
+++ b/__tests__/integration/solidarity-check/check-invalid.ts
@@ -1,7 +1,8 @@
 import execa from 'execa'
 import tempy from 'tempy'
 
-const SOLIDARITY = `${process.cwd()}/bin/solidarity`
+const path = require('path')
+const SOLIDARITY = `node ${process.cwd()}${path.sep}bin${path.sep}solidarity`
 const origCwd = process.cwd()
 let originalTimeout
 
@@ -21,7 +22,7 @@ afterAll(function() {
 
 test('default looks for .solidarity file', async done => {
   try {
-    await execa(SOLIDARITY)
+    await execa.shellSync(SOLIDARITY)
     done.fail()
   } catch (err) {
     expect(err.code).not.toBe(0)
diff --git a/__tests__/integration/solidarity-check/check-valid.ts b/__tests__/integration/solidarity-check/check-valid.ts
new file mode 100644
index 0000000..c738eaf
--- /dev/null
+++ b/__tests__/integration/solidarity-check/check-valid.ts
@@ -0,0 +1,79 @@
+import execa from 'execa'
+import tempy from 'tempy'
+
+const path = require('path')
+const filesystem = require('fs-jetpack')
+const SOLIDARITY = `node ${process.cwd()}${path.sep}bin${path.sep}solidarity`
+const origCwd = process.cwd()
+let originalTimeout
+
+beforeAll(() => {
+  // These can be slow on CI
+  originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000
+})
+
+afterAll(function() {
+  // Fix timeout change
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout
+})
+
+test('default looks for .solidarity file', async done => {
+  const tempDir = tempy.directory()
+  filesystem.copy(`__tests__${path.sep}sandbox${path.sep}solidarity_json${path.sep}.solidarity.json`, `${tempDir}${path.sep}.solidarity`)
+  process.chdir(tempDir)
+  try {
+    await execa.shell(SOLIDARITY).then(result => {
+      expect(result.stdout).toMatchSnapshot()
+      done()
+    })
+  } catch (err) {
+    done.fail()
+  }
+})
+
+test('also looks for .solidarity.json file', async done => {
+  const tempDir = tempy.directory()
+  filesystem.copy(`__tests__${path.sep}sandbox${path.sep}solidarity_json${path.sep}.solidarity.json`, `${tempDir}${path.sep}.solidarity.json`)
+  process.chdir(tempDir)
+  try {
+    await execa.shell(SOLIDARITY).then(result => {
+      expect(result.stdout).toMatchSnapshot()
+      done()
+    })
+  } catch (err) {
+    done.fail()
+  }
+})
+
+test('verbose flag works', async done => {
+  const tempDir = tempy.directory()
+  filesystem.copy(`__tests__${path.sep}sandbox${path.sep}solidarity_json${path.sep}.solidarity.json`, `${tempDir}${path.sep}.solidarity`)
+  process.chdir(tempDir)
+  try {
+    await execa.shell(`${SOLIDARITY} --verbose`).then(result => {
+      expect(result.stdout).toMatchSnapshot()
+      done()
+    })
+  } catch (err) {
+    done.fail()
+  }
+})
+
+test('silent flag works', async done => {
+  const tempDir = tempy.directory()
+  filesystem.copy(`__tests__${path.sep}sandbox${path.sep}solidarity_json${path.sep}.solidarity.json`, `${tempDir}${path.sep}.solidarity`)
+  process.chdir(tempDir)
+  try {
+    await execa.shell(`${SOLIDARITY} --silent`).then(result => {
+      expect(result.stdout).toMatchSnapshot()
+      done()
+    })
+  } catch (err) {
+    done.fail()
+  }
+})
+
+afterEach(() => {
+  process.chdir(origCwd)
+})
diff --git a/__tests__/integration/solidarity-report/report-basic.ts b/__tests__/integration/solidarity-report/report-basic.ts
new file mode 100644
index 0000000..4803f6b
--- /dev/null
+++ b/__tests__/integration/solidarity-report/report-basic.ts
@@ -0,0 +1,42 @@
+import execa from 'execa'
+import tempy from 'tempy'
+
+const path = require('path')
+const filesystem = require('fs-jetpack')
+const SOLIDARITY = `node ${process.cwd()}${path.sep}bin${path.sep}solidarity`
+const origCwd = process.cwd()
+let originalTimeout
+
+beforeAll(() => {
+  // These can be slow on CI
+  originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000
+  const tempDir = tempy.directory()
+  filesystem.copy(`__tests__${path.sep}sandbox${path.sep}solidarity_json${path.sep}.solidarity.json`, `${tempDir}${path.sep}.solidarity`)
+  process.chdir(tempDir)
+})
+
+afterAll(function() {
+  // Fix timeout change
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout
+})
+
+test('solidarity report works', async done => {
+  try {
+    execa.shell(`${SOLIDARITY} report`).then(result => {
+      // check a few from the report
+      expect(result.stdout.includes('OS')).toBeTruthy()
+      expect(result.stdout.includes('CPU')).toBeTruthy()
+      expect(result.stdout.includes('Report Info')).toBeTruthy()
+      expect(result.stdout.includes('node')).toBeTruthy()
+      expect(result.code).toBe(0)
+      done()
+    })
+  } catch (err) {
+    done.fail()
+  }
+})
+
+afterEach(() => {
+  process.chdir(origCwd)
+})
diff --git a/__tests__/integration/solidarity-snapshot/snapshot-nada.ts b/__tests__/integration/solidarity-snapshot/snapshot-nada.ts
new file mode 100644
index 0000000..55e4422
--- /dev/null
+++ b/__tests__/integration/solidarity-snapshot/snapshot-nada.ts
@@ -0,0 +1,37 @@
+import execa from 'execa'
+import tempy from 'tempy'
+
+const path = require('path')
+const SOLIDARITY = `node ${process.cwd()}${path.sep}bin${path.sep}solidarity`
+const origCwd = process.cwd()
+let originalTimeout
+
+beforeAll(() => {
+  // These can be slow on CI
+  originalTimeout = jasmine.DEFAULT_TIMEOUT_INTERVAL
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = 90000
+  const tempDir = tempy.directory()
+  process.chdir(tempDir)
+})
+
+afterAll(function() {
+  // Fix timeout change
+  jasmine.DEFAULT_TIMEOUT_INTERVAL = originalTimeout
+})
+
+test('solidarity report works', async done => {
+  try {
+    execa.shell(`echo n | ${SOLIDARITY} snapshot`).then(result => {
+      // do not snapshot stdout bc windows bitches
+      expect(result.stdout.includes('Nothing to do')).toBeTruthy()
+      expect(result.code).toBe(0)
+      done()
+    })
+  } catch (err) {
+    done.fail()
+  }
+})
+
+afterEach(() => {
+  process.chdir(origCwd)
+})
diff --git a/__tests__/sandbox/solidarity_json/.solidarity.json b/__tests__/sandbox/solidarity_json/.solidarity.json
index c46d251..c132fe1 100644
--- a/__tests__/sandbox/solidarity_json/.solidarity.json
+++ b/__tests__/sandbox/solidarity_json/.solidarity.json
@@ -1,11 +1,6 @@
 {
   "requirements": {
     "NPM": [{ "rule": "cli", "binary": "npm" }],
-    "Yarn": [{ "rule": "cli", "binary": "yarn", "semver": "^1.0.0", "version": "--version" }],
-    "Node": [{ "rule": "cli", "binary": "node", "semver": ">=7.6.0", "error": "Upgrade to latest node >= 7.6 please."}],
-    "TypeScript Active": [
-      { "rule": "dir", "location": "./src", "error": "Did you get this code from npm? Try github!" },
-      { "rule": "dir", "location": "./dist", "error": "You haven't compiled. Run the build script!" }
-    ]
+    "Node": [{ "rule": "cli", "binary": "node", "semver": ">=4.6.0", "error": "Upgrade to latest node >= 4.6 please."}]
   }
 }