aboutsummaryrefslogtreecommitdiff
path: root/test/content/mock/MockConsoleClient.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/mock/MockConsoleClient.ts')
-rw-r--r--test/content/mock/MockConsoleClient.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/content/mock/MockConsoleClient.ts b/test/content/mock/MockConsoleClient.ts
new file mode 100644
index 0000000..8de2d83
--- /dev/null
+++ b/test/content/mock/MockConsoleClient.ts
@@ -0,0 +1,26 @@
+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();
+ }
+}
+
+