forked from microsoft/CopilotHackathon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.ts
More file actions
36 lines (24 loc) · 898 Bytes
/
Copy pathtest.ts
File metadata and controls
36 lines (24 loc) · 898 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
//write npm command line to install mocha
//command to run this test file
//mocha test.js
import * as assert from 'assert';
import * as http from 'http';
describe('Node Server', () => {
it('should return "key not passed" if key is not passed', (done: Mocha.Done) => {
http.get('http://localhost:3000/get', (res: http.IncomingMessage) => {
let data = '';
res.on('data', (chunk: string) => {
data += chunk;
});
res.on('end', () => {
assert.strictEqual(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
});