Skip to content

Commit

Permalink
Fix failing tests on Node4+ | updated mocha for Node6+ compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaryatrh committed Sep 8, 2016
1 parent f9b441f commit f0dd267
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"devDependencies": {
"coffee-script": "1.10.x",
"coffeelint": "1.14.x",
"mocha": "2.1.x",
"mocha": "3.0.x",
"coffee-coverage": "1.0.x",
"istanbul": "0.4.x",
"coveralls": "2.11.x",
"chai": "1.10.x",
"sinon": "1.12.x",
"chai": "3.5.x",
"sinon": "1.17.x",
"grunt": "0.4.x",
"grunt-cli": "0.1.x"
}
Expand Down
9 changes: 6 additions & 3 deletions test/mainTest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ module.exports = run: ->
logs:
errors:
globalMessages: []
err = ["Error: ENOENT, no such file or directory './test/assets/fake.svg'"]

expect(svgAssets.rfds(path, 'file')).to.be.null
expect(svgAssets.shared.logs.errors.globalMessages).to.deep.members err
expect(svgAssets.shared.logs.errors.globalMessages[0]).to.match /ENOENT/
expect(svgAssets.shared.logs.errors.globalMessages[0]).to.match /\.\/test\/assets\/fake.svg/
expect(svgAssets.shared.logs.errors.globalMessages).to.have.lengthOf(1)


describe '@checkIfDir', ->
Expand All @@ -173,7 +174,9 @@ module.exports = run: ->
err = ["Error: ENOENT, no such file or directory './fake_folder/'"]

expect(svgAssets.checkIfDir(path)).to.be.null
expect(svgAssets.shared.logs.errors.globalMessages).to.deep.members err
expect(svgAssets.shared.logs.errors.globalMessages[0]).to.match /ENOENT/
expect(svgAssets.shared.logs.errors.globalMessages[0]).to.match /\.\/fake_folder/
expect(svgAssets.shared.logs.errors.globalMessages).to.have.lengthOf(1)



Expand Down

0 comments on commit f0dd267

Please sign in to comment.