-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIntern.test.js
25 lines (18 loc) · 892 Bytes
/
Intern.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
const Intern = require('../lib/employees/Intern');
const EnumEmployeeType = require('../lib/enum/EnumEmployeeType');
const testInternName = 'John';
const testInternId = 1;
const testInternEmail = 'john@gmail.com';
const testInternSchool = 'University of Birmingham';
test('Can set school via constructor', () => {
const employee = new Intern(testInternName, testInternId, testInternEmail, testInternSchool);
expect(employee.school).toBe(testInternSchool);
});
test(`getRole() should return "${EnumEmployeeType.INTERN}"`, () => {
const employee = new Intern(testInternName, testInternId, testInternEmail, 'UCLA');
expect(employee.getRole()).toBe(EnumEmployeeType.INTERN);
});
test('Can get school via getSchool()', () => {
const employee = new Intern(testInternName, testInternId, testInternEmail, testInternSchool);
expect(employee.getSchool()).toBe(testInternSchool);
});