Skip to content
Snippets Groups Projects
Commit fbdfaf4c authored by Lars Trieloff's avatar Lars Trieloff Committed by GitHub Enterprise
Browse files

Merge pull request #37 from maj/code-coverage

added JS code coverage reporting
parents 2f0580b3 86f52381
No related branches found
No related tags found
No related merge requests found
...@@ -25,3 +25,6 @@ npm-debug.log ...@@ -25,3 +25,6 @@ npm-debug.log
.DS_Store .DS_Store
.tool-versions .tool-versions
# instanbul code coverage
coverage
...@@ -67,13 +67,7 @@ Ensure you have all the dependencies installed via `npm install`, then run: ...@@ -67,13 +67,7 @@ Ensure you have all the dependencies installed via `npm install`, then run:
npm test npm test
``` ```
## TODOs ### Style Guide / Linting
* JSON Schema validation:
* property naming convention
* vocabulary spellchecking
## Style Guide / Linting
This project uses [eslint](https://eslint.org) to enforce JavaScript coding style. To run the linter: This project uses [eslint](https://eslint.org) to enforce JavaScript coding style. To run the linter:
...@@ -81,6 +75,16 @@ This project uses [eslint](https://eslint.org) to enforce JavaScript coding styl ...@@ -81,6 +75,16 @@ This project uses [eslint](https://eslint.org) to enforce JavaScript coding styl
npm run lint npm run lint
``` ```
### Code Coverage
You can run `npm run cover` to get a code coverage report, that is, a sense of how much of the project's code is "covered" by the test suite.
## TODOs
* JSON Schema validation:
* property naming convention
* vocabulary spellchecking
## Contributing ## Contributing
Please see [Contributing.md](Contributing.md) for details. Pull requests are welcome. Please see [Contributing.md](Contributing.md) for details. Pull requests are welcome.
......
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
"scripts": { "scripts": {
"lint": "eslint .", "lint": "eslint .",
"start": "node cli.js", "start": "node cli.js",
"test": "jasmine" "test": "jasmine",
"cover": "istanbul cover --root lib --print detail jasmine"
}, },
"dependencies": { "dependencies": {
"ajv": "^5.0.1-beta", "ajv": "^5.0.1-beta",
...@@ -26,6 +27,7 @@ ...@@ -26,6 +27,7 @@
}, },
"devDependencies": { "devDependencies": {
"eslint": "^4.10.0", "eslint": "^4.10.0",
"istanbul": "^0.4.5",
"jasmine": "~2.8.0" "jasmine": "~2.8.0"
}, },
"engines": { "engines": {
......
/**
* Copyright 2017 Adobe Systems Incorporated. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
var schema = require('../../lib/schema');
describe('schema module', () => {
});
/**
* Copyright 2017 Adobe Systems Incorporated. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*/
var Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
var writeFiles = require('../../lib/writeFiles');
describe('writeFiles module', () => {
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment