[backend][nodejs] Add sample test
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "mocha"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
9
backend/nodejs/test/test.js
Normal file
9
backend/nodejs/test/test.js
Normal file
@@ -0,0 +1,9 @@
|
||||
var assert = require('assert');
|
||||
|
||||
describe('Array', function () {
|
||||
describe('#indexOf', function () {
|
||||
it('should return -1 when the value is not present', function () {
|
||||
assert.strictEqual([1, 2, 3].indexOf(4), -1);
|
||||
});
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user