Skip to content

Commit

Permalink
Merge pull request tajo#53 from eagleeye/mocha-eslint
Browse files Browse the repository at this point in the history
Simplify test script, put linting into mocha test
  • Loading branch information
tajo committed Jan 30, 2016
2 parents e78fa4d + a85897d commit 17a011d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ node_js:
- "5"
- "4.1"
- "4.0"
before_script:
- npm install react react-dom
script:
- npm run lint
- npm test
- npm run build
- npm run build:examples
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,13 @@ Please, create issues and pull requests.
git clone https://github.com/tajo/react-portal
cd react-portal
npm install
npm install react react-dom
npm start
open http://localhost:3000
```

**Don't forget to run this before every commit:**

```
npm run lint
npm test
```

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"build:examples": "npm run clean && npm run build:examples:webpack",
"build:examples:webpack": "cross-env NODE_ENV=production webpack --config webpack.config.prod.js",
"clean": "rimraf build",
"test": "cross-env NODE_ENV=test mocha --compilers js:babel-register",
"lint": "eslint examples lib test devServer.js",
"test": "mocha",
"lint": "mocha test/eslint_spec.js",
"prepublish": "cross-env NODE_ENV=production npm run build"
},
"tags": [
Expand Down Expand Up @@ -58,7 +58,10 @@
"express": "^4.13.3",
"jsdom": "^7.2.2",
"mocha": "^2.3.4",
"mocha-eslint": "^1.0.0",
"react": "^0.14.7",
"react-addons-test-utils": "^0.14.6",
"react-dom": "^0.14.7",
"rimraf": "^2.5.0",
"sinon": "^1.17.2",
"tween.js": "^16.3.1",
Expand Down
1 change: 1 addition & 0 deletions test/eslint_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('mocha-eslint')('examples lib test devServer.js'.split(' '));
1 change: 1 addition & 0 deletions test/mocha.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
process.env.NODE_ENV = 'test';
2 changes: 2 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--compilers js:babel-register
--require ./test/mocha.js

0 comments on commit 17a011d

Please sign in to comment.