Setup mocha for apiserver testing
This commit is contained in:
parent
0c899f258d
commit
6e47e847f2
@ -4,12 +4,15 @@
|
|||||||
"description": "Serve API queries",
|
"description": "Serve API queries",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "mocha"
|
||||||
},
|
},
|
||||||
"author": "Tom Russell",
|
"author": "Tom Russell",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.16.3",
|
"express": "^4.16.3",
|
||||||
"pg": "^7.4.3"
|
"pg": "^7.4.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"mocha": "^5.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
12
apiserver/test/test.js
Normal file
12
apiserver/test/test.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* Demo test
|
||||||
|
*/
|
||||||
|
const assert = require('assert');
|
||||||
|
|
||||||
|
describe('Array', function() {
|
||||||
|
describe('#indexOf()', function() {
|
||||||
|
it('should return -1 when the value is not present', function() {
|
||||||
|
assert.equal([1,2,3].indexOf(4), -1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user