Skip to content

Commit

Permalink
Add support and testing for Sinon 2.x
Browse files Browse the repository at this point in the history
This uses Travis to test against the different versions supported.
  • Loading branch information
domenic committed Mar 20, 2017
1 parent 837d4c9 commit a7a12bd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
language: node_js
node_js:
- "0.10"
- iojs
- stable
env:
# Can't figure out how to DRY this up: http://stackoverflow.com/q/22397300/3191
- CHAI_VERSION=^1.9.2 SINON_VERSION=^1.4.0
- CHAI_VERSION=^2.0.0 SINON_VERSION=^1.4.0
- CHAI_VERSION=^3.0.0 SINON_VERSION=^1.4.0
- CHAI_VERSION=^1.9.2 SINON_VERSION=^2.0.0
- CHAI_VERSION=^2.0.0 SINON_VERSION=^2.0.0
- CHAI_VERSION=^3.0.0 SINON_VERSION=^2.0.0
script:
npm run lint && npm test
npm run lint && npm run test-travis
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@
"lib"
],
"scripts": {
"test": "npm run test-chai-1-9-2 && npm run test-chai-2-3-0 && npm run test-chai-3-0-0",
"test-chai-1-9-2": "npm install chai@1.9.2 && mocha",
"test-chai-2-3-0": "npm install chai@2.3.0 && mocha",
"test-chai-3-0-0": "npm install chai@3.0.0 && mocha",
"test": "mocha",
"test-travis": "npm install chai@$CHAI_VERSION && npm install sinon@$SINON_VERSION && npm test",
"lint": "jshint ./lib",
"cover": "istanbul cover node_modules/mocha/bin/_mocha && opener ./coverage/lcov-report/lib/sinon-chai.js.html"
},
"peerDependencies": {
"chai": ">=1.9.2 <4",
"sinon": ">=1.4.0 <2"
"sinon": ">=1.4.0 <3"
},
"devDependencies": {
"chai": "^3.0.0",
Expand All @@ -40,6 +38,6 @@
"jshint": "^2.5.6",
"mocha": "^1.21.4",
"opener": "^1.4.0",
"sinon": "^1.10.3"
"sinon": "^2.0.0"
}
}

0 comments on commit a7a12bd

Please sign in to comment.