forked from microsoft/CopilotHackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.test.js
More file actions
44 lines (34 loc) · 1.08 KB
/
Copy pathtest.test.js
File metadata and controls
44 lines (34 loc) · 1.08 KB
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
44
// BEGIN: ed8c6549bwf9
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();
});
});
});
it('should return "Hello, world!" if key is equal to "world"', (done) => {
http
.get('http://localhost:3000/get?key=world' , (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
assert.equal(data, 'Hello, world!');
done();
});
});
});
//add test to check validatephoneNumber
//write test to validate validateSpanishDNI
//write test for returnColorCode red should return code #FF0000
//write test for daysBetweenDates
});
// END: ed8c6549bwf9