Skip to content

Commit 844c498

Browse files
author
John Doherty
committed
added test framework and CI builds
1 parent 0abdae5 commit 844c498

File tree

4 files changed

+25
-16
lines changed

4 files changed

+25
-16
lines changed

README.MD

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# jsdoc-to-json-schema
22

3-
[![npm](https://img.shields.io/npm/dt/jsdoc-to-json-schema.svg)](https://www.npmjs.com/package/jsdoc-to-json-schema) [![Linked In](https://img.shields.io/badge/Linked-In-blue.svg)](https://www.linkedin.com/in/john-i-doherty) [![Twitter Follow](https://img.shields.io/twitter/follow/CambridgeMVP.svg?style=social&label=Twitter&style=plastic)](https://twitter.com/CambridgeMVP)
3+
[![Shippable branch](https://img.shields.io/shippable/5818b23cd68ac10e0020bf2b/master.svg)](https://app.shippable.com/projects/5818b23cd68ac10e0020bf2b) [![npm](https://img.shields.io/npm/dt/jsdoc-to-json-schema.svg)](https://www.npmjs.com/package/jsdoc-to-json-schema) [![Linked In](https://img.shields.io/badge/Linked-In-blue.svg)](https://www.linkedin.com/in/john-i-doherty) [![Twitter Follow](https://img.shields.io/twitter/follow/CambridgeMVP.svg?style=social&label=Twitter&style=plastic)](https://twitter.com/CambridgeMVP)
44

55
Generate JSON schemas from JavaScript comments using a new jsDoc *@schema* tag.
66

@@ -206,13 +206,6 @@ The following [JSON Schema v3](https://tools.ietf.org/html/draft-zyp-json-schema
206206
| `@schema.uniqueItems` | boolean
207207
| `@schema.default` | any
208208

209-
210-
## TODO
211-
212-
1. Add unit tests
213-
2. Add options (i.e. strict mode, ignoring none schema defined tags)
214-
3. Add glob support
215-
216209
## License
217210

218211
Licensed under [ISC License](LICENSE) © [John Doherty](http://www.johndoherty.info)

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "jsdoc-to-json-schema",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "Generate JSON Schema from jsDoc comments.",
55
"main": "index.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "./node_modules/.bin/jasmine-node --verbose --junitreport test"
88
},
99
"repository": {
1010
"type": "git",
@@ -26,17 +26,18 @@
2626
"url": "https://github.com/john-doherty/jsdoc-to-json-schema/issues"
2727
},
2828
"homepage": "https://github.com/john-doherty/jsdoc-to-json-schema#readme",
29-
"devDependencies": {
30-
"express": "^4.13.4",
31-
"eslint": "^3.12.2",
32-
"eslint-config-airbnb-base": "^11.0.0",
33-
"eslint-plugin-import": "^2.2.0"
34-
},
3529
"dependencies": {
3630
"commander": "^2.9.0",
3731
"fs-extra-promise": "^0.3.1",
3832
"jsdoc-parse": "^1.2.7",
3933
"stream-to-string": "^1.0.1",
4034
"string-to-stream": "^1.1.0"
35+
},
36+
"devDependencies": {
37+
"express": "^4.13.4",
38+
"eslint": "^3.12.2",
39+
"eslint-config-airbnb-base": "^11.0.0",
40+
"eslint-plugin-import": "^2.2.0",
41+
"jasmine-node": "^1.14.5"
4142
}
4243
}

shippable.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: node_js
2+
3+
ci:
4+
- shippable_retry npm install
5+
- npm test

test/jsdoctojsonschema.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
var toJsonSchema = require('../index.js');
4+
5+
describe('jsdoc-to-json-schema', function () {
6+
7+
it('should be defined', function () {
8+
expect(toJsonSchema).toBeDefined();
9+
});
10+
});

0 commit comments

Comments
 (0)