aboutsummaryrefslogtreecommitdiff
path: root/test/content/mock/MockConsoleClient.ts
blob: 849c00d1592539d595474a5115e7340c10f5f79c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import ConsoleClient from "../../../src/content/client/ConsoleClient";

export default class MockConsoleClient implements ConsoleClient {
  public isError: boolean;

  public text: string;

  constructor() {
    this.isError = false;
    this.text = "";
  }

  info(text: string): Promise<void> {
    this.isError = false;
    this.text = text;
    return Promise.resolve();
  }

  error(text: string): Promise<void> {
    this.isError = true;
    this.text = text;
    return Promise.resolve();
  }
}