MCPcopy
hub / github.com/diffgram/diffgram / TestCommand

Class TestCommand

frontend/tests/unit/helpers/TestClasses/TestCommand.ts:3–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import { CommandInterface } from "../../../../src/helpers/interfaces/Command";
2
3export 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected