-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEngineer.test.js
More file actions
25 lines (18 loc) · 963 Bytes
/
Engineer.test.js
File metadata and controls
25 lines (18 loc) · 963 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
const Engineer = require('../lib/employees/Engineer');
const EnumEmployeeType = require('../lib/enum/EnumEmployeeType');
const testEngineerName = 'Muhammad';
const testEngineerId = 1;
const testEngineerEmail = 'muhammad@gmail.com';
const testEngineerGithub = 'GitHubUser';
test('Can set GitHUb account via constructor', () => {
const employee = new Engineer(testEngineerName, testEngineerId, testEngineerEmail, testEngineerGithub);
expect(employee.github).toBe(testEngineerGithub);
});
test(`getRole() should return "${EnumEmployeeType.ENGINEER}"`, () => {
const employee = new Engineer(testEngineerName, testEngineerId, testEngineerEmail, testEngineerGithub);
expect(employee.getRole()).toBe(EnumEmployeeType.ENGINEER);
});
test('Can get GitHub username via getGithub()', () => {
const employee = new Engineer(testEngineerName, testEngineerId, testEngineerEmail, testEngineerGithub);
expect(employee.getGithub()).toBe(testEngineerGithub);
});