Skip to content

Commit 615a001

Browse files
committed
code coverage
1 parent 6948e79 commit 615a001

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.gitignore

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

.travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ env:
77
global:
88
- BUILD_TIMEOUT=10000
99
install: npm install
10+
after_success: npm run coverage

mocha.opts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
--require babel-register
12
--require reify

package.json

+20-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "dist/svelte.umd.js",
66
"module": "dist/svelte.es.js",
77
"scripts": {
8-
"test": "mocha --opts mocha.opts --recursive ./**/__test__.js test/test.js",
8+
"test": "nyc mocha --opts mocha.opts --recursive ./**/__test__.js test/test.js",
9+
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
910
"lint": "eslint compiler",
1011
"build": "rollup -c",
1112
"prebuild": "npm test",
@@ -28,11 +29,16 @@
2829
},
2930
"homepage": "https://github.com/sveltejs/svelte#README",
3031
"devDependencies": {
32+
"babel-plugin-istanbul": "^3.0.0",
33+
"babel-plugin-transform-es2015-modules-commonjs": "^6.18.0",
34+
"babel-register": "^6.18.0",
35+
"codecov": "^1.0.1",
3136
"eslint": "^3.10.2",
3237
"eslint-plugin-import": "^2.2.0",
3338
"jsdom": "^9.8.3",
3439
"mocha": "^3.1.2",
3540
"node-resolve": "^1.3.3",
41+
"nyc": "^9.0.1",
3642
"reify": "^0.4.0",
3743
"rollup": "^0.36.3",
3844
"rollup-plugin-node-resolve": "^2.0.0"
@@ -42,5 +48,18 @@
4248
"estree-walker": "^0.3.0",
4349
"locate-character": "^2.0.0",
4450
"magic-string": "^0.16.0"
51+
},
52+
"nyc": {
53+
"include": [
54+
"compiler/**/*.js"
55+
],
56+
"exclude": [
57+
"compiler/**/__test__.js"
58+
]
59+
},
60+
"babel": {
61+
"plugins": [
62+
"transform-es2015-modules-commonjs"
63+
]
4564
}
4665
}

0 commit comments

Comments
 (0)