Skip to content

Commit 963371d

Browse files
committed
ex-1: introduce Manager subclass
1 parent 1e74c99 commit 963371d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Employee } from '..';
2+
3+
export class Manager extends Employee {
4+
constructor(name) {
5+
super(name, `manager`);
6+
}
7+
8+
get type() {
9+
return `manager`;
10+
}
11+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Manager } from '.';
2+
3+
describe('Manager', () => {
4+
it('should have type "manager"', () => {
5+
const engineer = new Manager('Kaio');
6+
expect(engineer.type).toBe('manager');
7+
});
8+
});

0 commit comments

Comments
 (0)