Skip to content

Commit 422e7ed

Browse files
committed
build(unit-tests): executed unit tests and coverage reporting through npm scripts rather than grunt
1 parent 83fe155 commit 422e7ed

7 files changed

+12
-29
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules/
22
dist/
33
lib/
4-
coverage/
4+
coverage/
5+
.nyc_output/

.npmignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ stories/
55
test/
66
node_modules/
77
coverage/
8+
.nyc_output/
89

910
.babelrc
1011
.editorconfig
1112
.eslintrc.yml
13+
.eslintignore
1214
.gitattributes
1315
.nvmrc
14-
.scss-lint
16+
.markdownlintrc
17+
.sass-lint.yml
1518
.travis.yml
16-
Gemfile*
1719
Gruntfile.js

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: node_js
22
notifications:
33
email: false
4+
after_success: npm run report-coverage
45
before_deploy:
56
- npm run build-storybook
67
- git config --global user.name "$GIT_NAME"

grunt/aliases.yml

-8
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,3 @@ build:
33
- rollup
44
- copy:scss
55
- notify:rebuild
6-
7-
unit: mocha_istanbul:unit
8-
9-
test: unit
10-
11-
verify: test
12-
13-
default: verify

grunt/eslint.yml

-10
This file was deleted.

grunt/mocha_istanbul.yml

-7
This file was deleted.

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
"lint:md": "globstar --node -- markdownlint **/*.md",
77
"lint:js": "eslint .",
88
"lint:sass": "sass-lint src/**/*.scss",
9-
"test": "grunt && run-s lint:* test:*",
9+
"test": "run-s lint:* test:*",
10+
"test:unit": "mocha --recursive test/unit",
1011
"test:integration": "mocha stories/ -r .storybook/mocha-config.js --compilers js:babel-register",
12+
"coverage": "nyc run-s test:unit",
13+
"report-coverage": "nyc report --reporter=text-lcov | coveralls",
1114
"start": "start-storybook -p 9002",
1215
"build-storybook": "build-storybook -o dist/storybook",
1316
"deploy": "gh-pages --silent -r \"https://[email protected]/travi/admin.travi.org-components.git\" -d dist/storybook/",
@@ -77,6 +80,7 @@
7780
"mocha": "3.2.0",
7881
"node-sass": "4.3.0",
7982
"npm-run-all": "4.0.1",
83+
"nyc": "10.1.2",
8084
"react": "15.4.2",
8185
"react-addons-test-utils": "15.4.2",
8286
"react-helmet": "4.0.0",

0 commit comments

Comments
 (0)