Skip to content

Commit

Permalink
Overhaul tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed May 30, 2018
1 parent 159b156 commit 4bd78e0
Show file tree
Hide file tree
Showing 34 changed files with 3,775 additions and 2,456 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ yarn-error.log
.DS_Store
/lib
/demo
/test/coverage
/coverage
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ node_js:
- node
script:
- npm run lint
- npm run test
- npm run test:coverage
- npm run build:lib
- npm run build:demo
- npm run build:dist
- npm run build:standalone
after_success:
- npm run coverage
- npm run test:codecov
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && sshpass -e scp -r -o stricthostkeychecking=no demo/* $DEPLOY_DEST
env:
global:
Expand Down
40 changes: 27 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
"clean": "rimraf lib demo",
"start": "webpack-dev-server",
"lint": "standard --verbose | snazzy",
"test": "cross-env NODE_ENV=test babel-node ./node_modules/karma/bin/karma start test/karma.config.js",
"coverage": "codecov",
"test": "cross-env NODE_ENV=test ava",
"test:coverage": "cross-env NODE_ENV=test nyc ava",
"test:codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"build:lib": "cross-env NODE_ENV=production babel src -d lib --ignore src/demo",
"build:demo": "cross-env NODE_ENV=production webpack --config webpack.demo.babel.js",
"build:dist": "cross-env NODE_ENV=production webpack --config webpack.dist.babel.js",
Expand Down Expand Up @@ -52,6 +53,7 @@
},
"devDependencies": {
"auto-changelog": "^1.2.2",
"ava": "^0.25.0",
"babel-cli": "^6.26.0",
"babel-core": "^6.16.0",
"babel-eslint": "^8.2.1",
Expand All @@ -64,23 +66,15 @@
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-0": "^6.16.0",
"chai": "^4.0.2",
"codecov": "^3.0.0",
"cross-env": "^5.1.3",
"css-loader": "^0.28.9",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
"exports-loader": "^0.6.3",
"extract-text-webpack-plugin": "^3.0.2",
"html-webpack-plugin": "^2.30.1",
"karma": "^2.0.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.2.0",
"karma-mocha-reporter": "^2.2.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.9",
"mocha": "^4.1.0",
"nyc": "^11.7.1",
"postcss-automath": "^1.0.1",
"postcss-loader": "^2.0.10",
"postcss-nested": "^3.0.0",
Expand All @@ -91,6 +85,7 @@
"react-hot-loader": "^4.0.0-beta.15",
"rimraf": "^2.5.4",
"screenfull": "^3.3.2",
"sinon": "^5.0.3",
"snazzy": "^7.0.0",
"standard": "^11.0.0-beta.0",
"style-loader": "^0.19.1",
Expand Down Expand Up @@ -139,5 +134,24 @@
"ignore": [
"/dist/*"
]
},
"ava": {
"babel": "inherit",
"require": [
"babel-register",
"babel-polyfill"
]
},
"nyc": {
"all": true,
"include": "src",
"sourceMap": false,
"instrument": false,
"report-dir": "./coverage",
"temp-directory": "./coverage/.nyc_output",
"reporter": [
"text",
"html"
]
}
}

0 comments on commit 4bd78e0

Please sign in to comment.