 describe 'linter helpers', ->
   describe '::exec', ->
     it 'cries when no argument is passed', ->
-      gotError = false
-      try
+      expect ->
         helpers.exec()
-      catch erro then gotError = true
-      expect(gotError).toBe(true)
+      .toThrow()
     it 'works', ->
       waitsForPromise ->
         helpers.exec('cat', [testFile]).then (text) ->

      waitsForPromise ->
        helpers.exec('cat', [], stream: 'stdout', stdin: testContents).then (text) ->
          expect(text).toBe(testContents)
  describe '::execFilePath', ->
    it 'cries when no argument is passed', ->
      gotError = false
      try
        helpers.execFilePath()
      catch erro then gotError = true
      expect(gotError).toBe(true)
    it 'cries when no filepath is passed', ->
      gotError = false
      try

      expect(results).toEqual(output)
  describe '::findFile', ->
    it 'cries wen no argument is passed', ->
      expect ->
        helpers.findFile()
      .toThrow()
    it 'works', ->
      expect(helpers.findFile(__dirname, 'package.json')).toBe(fs.realpathSync(__dirname + '/../package.json'))