diff --git a/package.json b/package.json index 936ec02..f7b3ed9 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,14 @@ { "scripts": { "test": "jest && mocha --compilers js:mocha-traceur tests/**/*.spec.js", + "test-react": "jest", + "test-js": "mocha --compilers js:mocha-traceur tests/**/*.spec.js", "start": "npm install && bower install && gulp", "lint": "jsxhint --jsx-only ." }, - "pre-commit": ["lint"], + "pre-commit": [ + "lint" + ], "jest": { "testFileExtensions": [ "jest.js" @@ -27,7 +31,8 @@ "mocha-traceur": "^2.1.0", "precommit-hook": "^2.0.1", "react-tools": "^0.13.3", - "sinon": "^1.14.1" + "sinon": "^1.15.4", + "sinon-chrome": "^0.1.2" }, "dependencies": { "bootstrap": "^3.3.4", diff --git a/tests/helpers/Chrome.spec.js b/tests/helpers/Chrome.spec.js new file mode 100644 index 0000000..336b204 --- /dev/null +++ b/tests/helpers/Chrome.spec.js @@ -0,0 +1,11 @@ +var chai = require('chai'); +var sinon = require('sinon'); +var chrome = require('sinon-chrome'); +var expect = chai.expect; + +describe('Chrome Dev Tools', function() { + it('should work', function() { + chrome.browserAction.setTitle({title: 'hello'}); + sinon.assert.calledOnce(chrome.browserAction.setTitle); + }); +});