Skip to content

Commit

Permalink
Add coverage through instanbul + coveralls
Browse files Browse the repository at this point in the history
 ## Why is the change being made?

This change is made because GCS has no coverage currently. It is
important to have coverage in code to see how much code is actually
unit tested.

 ## What has changed to address the problem?

This change adds coverage to the code. The coverage right now is pretty
bad but it can always be improved in the future.

 ## How was this change tested?

This change was tested with `npm test`.

 ## Related documents, URLs, commits
  • Loading branch information
Luis729 committed Feb 29, 2020
1 parent e5770cc commit 4ca9f76
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package-lock.json

# Ignore generated folders
.nyc_output
dist
node_modules
site
Expand Down
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ cache: npm
# Scripts to run to test application
script:
- npm test

# Run coverage after tests pass
after_success: npm run coverage
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://travis-ci.com/NGCP/GCS.svg?branch=master)](https://travis-ci.com/NGCP/GCS)
[![Documentation Status](https://readthedocs.org/projects/ground-control-station/badge/?version=latest)](https://readthedocs.org/projects/ground-control-station/builds/)
[![Coverage Status](https://coveralls.io/repos/github/NGCP/GCS/badge.svg?branch=master)](https://coveralls.io/github/NGCP/GCS?branch=master)
[![dependencies Status](https://david-dm.org/NGCP/GCS/status.svg)](https://david-dm.org/NGCP/GCS)
[![devDependencies Status](https://david-dm.org/NGCP/GCS/dev-status.svg)](https://david-dm.org/NGCP/GCS?type=dev)

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GCS",
"version": "0.10.2",
"version": "0.11.2",
"license": "MIT",
"author": "Northrop Grumman Collaboration Project",
"description": "Ground Control Station for autonomous vehicle platforms in NGCP",
Expand All @@ -13,7 +13,8 @@
"test:stylelint": "stylelint \"**/*.css\"",
"test:remarklint": "remark .",
"test:types": "tsc --project . --outDir dist --pretty",
"test:unit": "mocha --require ts-node/register test/**/*.test.ts",
"test:unit": "nyc mocha --require ts-node/register test/**/*.test.ts",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"start": "electron-webpack dev",
"docs": "mkdocs serve",
"build": "electron-webpack && electron-builder"
Expand Down Expand Up @@ -50,6 +51,7 @@
"@typescript-eslint/parser": "^2.19.0",
"babel-eslint": "^10.0.3",
"chai": "^4.2.0",
"coveralls": "^3.0.9",
"dotenv-webpack": "^1.7.0",
"electron": "^3",
"electron-builder": "^22.3.2",
Expand All @@ -65,6 +67,7 @@
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^1.7",
"mocha": "^7.0.1",
"nyc": "^15.0.0",
"remark-cli": "^7.0.1",
"remark-preset-lint-markdown-style-guide": "^2.1.3",
"stylelint": "^13.1.0",
Expand Down

0 comments on commit 4ca9f76

Please sign in to comment.