Skip to content

Commit 3a67a58

Browse files
authored
Merge pull request #25 from tomyitav/coverage-report
fix: adding coverage back
2 parents 0bbb730 + f8e8acf commit 3a67a58

File tree

5 files changed

+30
-13
lines changed

5 files changed

+30
-13
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ node_js:
1111
script:
1212
- npm run test:prod && npm run build
1313
after_success:
14+
- npm run report-coverage
1415
- npm run deploy-docs
1516
- npm run semantic-release

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# generate-graphql-app
22

33
[![Build Status](https://travis-ci.org/tomyitav/generate-graphql-app.svg?branch=master)](https://travis-ci.org/tomyitav/generate-graphql-app)
4+
[![Coverage Status](https://coveralls.io/repos/github/tomyitav/generate-graphql-app/badge.svg?branch=master)](https://coveralls.io/github/tomyitav/generate-graphql-app?branch=master)
45
[![npm](https://img.shields.io/npm/v/generate-graphql-app.svg)](https://www.npmjs.com/package/generate-graphql-app)
56
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
67
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)

package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
"prebuild": "rimraf dist",
3434
"build": "tsc --module commonjs && rollup -c rollup.config.ts && typedoc --out docs --target es6 --theme minimal --mode file src",
3535
"start": "rollup -c rollup.config.ts",
36-
"test": "jest",
36+
"test": "jest --coverage",
3737
"test:watch": "jest --watch --verbose false",
38-
"test:prod": "npm run lint && npm run test",
38+
"test:prod": "npm run lint && npm run test -- --no-cache",
3939
"deploy-docs": "ts-node tools/gh-pages-publish",
4040
"report-coverage": "cat ./coverage/lcov.info | coveralls",
4141
"commit": "git-cz",
@@ -76,15 +76,18 @@
7676
],
7777
"coverageThreshold": {
7878
"global": {
79-
"branches": 90,
80-
"functions": 95,
81-
"lines": 95,
82-
"statements": 95
79+
"branches": 80,
80+
"functions": 90,
81+
"lines": 85,
82+
"statements": 85
8383
}
8484
},
85-
"collectCoverage": false,
85+
"collectCoverage": true,
8686
"collectCoverageFrom": [
87-
"src/*.{js,ts}"
87+
"src/**/*.js",
88+
"src/**/*.ts",
89+
"!src/gga.ts",
90+
"!src/declarations.d.ts"
8891
]
8992
},
9093
"prettier": {

test/commands/all-commands.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import allCommands from '../../src/commands/all-commands'
2+
3+
describe('test all commands file', () => {
4+
it('works if allCommands is a valid array', () => {
5+
expect(allCommands.length > 0).toBeTruthy()
6+
for (let command of allCommands) {
7+
expect(command.getAlias().length > 0).toBeTruthy()
8+
expect(command.getDescription().length > 0).toBeTruthy()
9+
expect(command.getAction()).toBeInstanceOf(Function)
10+
}
11+
})
12+
})

0 commit comments

Comments
 (0)