aboutsummaryrefslogtreecommitdiff
path: root/test/content/repositories/FollowKeyRepository.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/repositories/FollowKeyRepository.test.ts')
-rw-r--r--test/content/repositories/FollowKeyRepository.test.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/content/repositories/FollowKeyRepository.test.ts b/test/content/repositories/FollowKeyRepository.test.ts
index 6608662..fa35a54 100644
--- a/test/content/repositories/FollowKeyRepository.test.ts
+++ b/test/content/repositories/FollowKeyRepository.test.ts
@@ -1,29 +1,28 @@
import FollowKeyRepository, {
FollowKeyRepositoryImpl,
} from "../../../src/content/repositories/FollowKeyRepository";
-import { expect } from "chai";
describe("FollowKeyRepositoryImpl", () => {
let sut: FollowKeyRepository;
- before(() => {
+ beforeEach(() => {
sut = new FollowKeyRepositoryImpl();
});
describe("#getKeys()/#pushKey()/#popKey()", () => {
it("enqueues keys", () => {
- expect(sut.getKeys()).to.be.empty;
+ expect(sut.getKeys()).toHaveLength(0);
sut.pushKey("a");
sut.pushKey("b");
sut.pushKey("c");
- expect(sut.getKeys()).to.deep.equal(["a", "b", "c"]);
+ expect(sut.getKeys()).toEqual(["a", "b", "c"]);
sut.popKey();
- expect(sut.getKeys()).to.deep.equal(["a", "b"]);
+ expect(sut.getKeys()).toEqual(["a", "b"]);
sut.clearKeys();
- expect(sut.getKeys()).to.be.empty;
+ expect(sut.getKeys()).toHaveLength(0);
});
});
});