class-fixture.js 294 B

1234567891011121314151617181920212223
  1. export class Person {
  2. constructor(name) {
  3. this.name = name;
  4. }
  5. test() {
  6. return true;
  7. }
  8. sayHi() {
  9. return `Hi ${this.name}`;
  10. }
  11. }
  12. export class OtherPerson extends Person {
  13. constructor() {
  14. super('David');
  15. }
  16. sayHi() {
  17. return `${super.sayHi()} Luecke`;
  18. }
  19. }