-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcourse.test.js
30 lines (24 loc) · 884 Bytes
/
course.test.js
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
const {addCourse} = require('./addCourse');
const {courseAlloted} = require('./alloate');
const {registerCourse} = require('./register');
const {main} = require('./geektrust');
const assert =require('assert');
global.courseList = [];
global.registerEmp = [];
describe( " Course register test", () => {
beforeEach(() => {
console.log( "executes before every test" );
});
it("should add course", () => {
const temp= addCourse('JAVA', 'JAMES', '15062022', 1, 2 )
assert.equal(temp,'OFFERING-JAVA-JAMES');
});
it("should 2 register course", () => {
const reg = registerCourse('ANDY@GMAIL.COM', 'OFFERING-JAVA-JAMES')
assert.equal(reg,'REG-COURSE-ANDY-JAVA ACCEPTED');
});
it("ahould one course allocate", () => {
const reg1 = courseAlloted('OFFERING-JAVA-JAMES')
assert.equal(reg1,true);
});
});