forked from microsoft/CopilotHackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
43 lines (27 loc) · 932 Bytes
/
Copy pathtest.js
File metadata and controls
43 lines (27 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//write npm command line to install mocha
//npm install --global mocha
//command to run this test file
//mocha test.js
const assert = require('assert');
const http = require('http');
const server = require('./NodeServer');
describe('Node Server', () => {
it('should return "key not passed" if key is not passed', (done) => {
http
.get('http://localhost:3000/get' , (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
assert.equal(data, 'key not passed');
done();
});
});
});
//add test to check get when key is equal to world
//add test to check validatephoneNumber
//write test to validate validateSpanishDNI
//write test for returnColorCode red should return code #FF0000
//write test for daysBetweenDates
});