Skip to content

Commit ae951bb

Browse files
committed
feat: insatall coveralls and travis
1 parent d12e0d9 commit ae951bb

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module.exports = {
2-
preset: '@vue/cli-plugin-unit-jest/presets/no-babel'
2+
preset: '@vue/cli-plugin-unit-jest/presets/no-babel',
3+
collectCoverage: true,
4+
collectCoverageFrom: ['lib/**', '!lib/utils/**']
35
}

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"build": "rollup -c --environment BUILD:production",
2020
"dev": "rollup -c -w --environment BUILD:production",
2121
"test": "vue-cli-service test:unit",
22-
"lint": "vue-cli-service lint"
22+
"lint": "vue-cli-service lint",
23+
"coveralls": "vue-cli-service test:unit && cat ./coverage/lcov.info | coveralls"
2324
},
2425
"devDependencies": {
2526
"@atomico/rollup-plugin-sizes": "^1.1.4",
@@ -32,6 +33,7 @@
3233
"@vue/eslint-config-prettier": "^6.0.0",
3334
"@vue/test-utils": "^1.1.2",
3435
"babel-eslint": "10.1.0",
36+
"coveralls": "^3.1.0",
3537
"eslint": "6.7.2",
3638
"eslint-config-airbnb-base": "^14.2.0",
3739
"eslint-plugin-import": "^2.22.0",

travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: node_js
2+
node_js:
3+
- '12'
4+
cache:
5+
directories:
6+
- node_modules
7+
script:
8+
- yarn coveralls

yarn.lock

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3254,6 +3254,17 @@ cosmiconfig@^7.0.0:
32543254
path-type "^4.0.0"
32553255
yaml "^1.10.0"
32563256

3257+
coveralls@^3.1.0:
3258+
version "3.1.0"
3259+
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b"
3260+
integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==
3261+
dependencies:
3262+
js-yaml "^3.13.1"
3263+
lcov-parse "^1.0.0"
3264+
log-driver "^1.2.7"
3265+
minimist "^1.2.5"
3266+
request "^2.88.2"
3267+
32573268
create-ecdh@^4.0.0:
32583269
version "4.0.4"
32593270
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e"
@@ -6601,6 +6612,11 @@ lazy-cache@^1.0.3:
66016612
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
66026613
integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4=
66036614

6615+
lcov-parse@^1.0.0:
6616+
version "1.0.0"
6617+
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0"
6618+
integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A=
6619+
66046620
left-pad@^1.3.0:
66056621
version "1.3.0"
66066622
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
@@ -6795,6 +6811,11 @@ lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17
67956811
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
67966812
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
67976813

6814+
log-driver@^1.2.7:
6815+
version "1.2.7"
6816+
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
6817+
integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==
6818+
67986819
log-symbols@^2.2.0:
67996820
version "2.2.0"
68006821
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"

0 commit comments

Comments
 (0)