Skip to content

Commit a43a99c

Browse files
committed
Use NullSlack for test slack worker
1 parent 226845f commit a43a99c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/checker/slack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface Slack {
77
sendInfo(title: string, text: string): void;
88
}
99

10-
class NullSlack implements Slack {
10+
export class NullSlack implements Slack {
1111
public sendError(__: string) {
1212
// empty
1313
}

test/helper.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { SDK } from "codechain-sdk";
33
import { Block, H256, Transaction, U64 } from "codechain-sdk/lib/core/classes";
44
import { readFileSync, writeFile } from "fs";
55
import * as path from "path";
6+
import { NullSlack } from "../src/checker/slack";
67
import { IndexerConfig } from "../src/config";
78
import * as BlockModel from "../src/models/logic/block";
89
import Worker from "../src/worker";
@@ -22,7 +23,10 @@ export const sdk = new SDK({
2223
networkId: CODECHAIN_NETWORK_ID
2324
});
2425

25-
export const worker = new Worker({ sdk }, options.worker);
26+
export const worker = new Worker(
27+
{ sdk, slack: new NullSlack() },
28+
options.worker
29+
);
2630

2731
export const ACCOUNT_SECRET =
2832
process.env.ACCOUNT_SECRET ||

0 commit comments

Comments
 (0)