| 1 | import { CommandInterface } from "../../../../src/helpers/interfaces/Command"; |
| 2 | |
| 3 | export default class TestCommand implements CommandInterface { |
| 4 | public name: string; |
| 5 | private mockExecute: Function; |
| 6 | private mockUndo: Function; |
| 7 | |
| 8 | constructor(name: string, mockExecute?: Function, mockUndo?: Function) { |
| 9 | this.name = name; |
| 10 | this.mockExecute = mockExecute; |
| 11 | this.mockUndo = mockUndo; |
| 12 | } |
| 13 | |
| 14 | execute() { |
| 15 | this.mockExecute() |
| 16 | }; |
| 17 | |
| 18 | undo() { |
| 19 | this.mockUndo() |
| 20 | }; |
| 21 | } |
nothing calls this directly
no outgoing calls
no test coverage detected