aboutsummaryrefslogtreecommitdiff
path: root/test/content/operators/impls/FindPrevOperator.test.ts
blob: 1ebde8d8a8f5f3e685d1edc20a13cb1f7b20e605 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sinon from "sinon";
import FindPrevOperator from "../../../../src/content/operators/impls/FindPrevOperator";
import MockFindMasterClient from "../../mock/MockFindMasterClient";

describe("FindPrevOperator", () => {
  describe("#run", () => {
    it("find previous keyword", async () => {
      const client = new MockFindMasterClient();
      const mock = sinon.mock(client).expects("findPrev").exactly(3);
      const sut = new FindPrevOperator(client, 3);

      await sut.run();

      mock.verify();
    });
  });
});