aboutsummaryrefslogtreecommitdiff
path: root/test/content/operators/impls/StartFollowOperator.test.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-09-30 00:16:32 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-09-30 00:24:35 +0900
commitacfe1b78009b0c3183cd69eebdabb458e2079b73 (patch)
tree20b6c71228976173f4086d34aec552feadb461fc /test/content/operators/impls/StartFollowOperator.test.ts
parentc843809ba29bd70c28b9a19e4cb3f1002edee781 (diff)
Move mock library to jest
Diffstat (limited to 'test/content/operators/impls/StartFollowOperator.test.ts')
-rw-r--r--test/content/operators/impls/StartFollowOperator.test.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/content/operators/impls/StartFollowOperator.test.ts b/test/content/operators/impls/StartFollowOperator.test.ts
index 8f9bd2d..4216cd0 100644
--- a/test/content/operators/impls/StartFollowOperator.test.ts
+++ b/test/content/operators/impls/StartFollowOperator.test.ts
@@ -1,4 +1,3 @@
-import sinon from "sinon";
import StartFollowOperator from "../../../../src/content/operators/impls/StartFollowOperator";
import MockFollowMasterClient from "../../mock/MockFollowMasterClient";
@@ -6,15 +5,14 @@ describe("StartFollowOperator", () => {
describe("#run", () => {
it("starts following links", async () => {
const client = new MockFollowMasterClient();
- const mock = sinon
- .mock(client)
- .expects("startFollow")
- .withArgs(true, false);
+ const startFollowSpy = jest
+ .spyOn(client, "startFollow")
+ .mockReturnValue();
const sut = new StartFollowOperator(client, true, false);
await sut.run();
- mock.verify();
+ expect(startFollowSpy).toBeCalledWith(true, false);
});
});
});