diff options
Diffstat (limited to 'test/content/repositories/FollowMasterRepository.test.ts')
-rw-r--r-- | test/content/repositories/FollowMasterRepository.test.ts | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/test/content/repositories/FollowMasterRepository.test.ts b/test/content/repositories/FollowMasterRepository.test.ts index 3eb172f..9b5e151 100644 --- a/test/content/repositories/FollowMasterRepository.test.ts +++ b/test/content/repositories/FollowMasterRepository.test.ts @@ -1,42 +1,43 @@ -import FollowMasterRepository, { FollowMasterRepositoryImpl } - from '../../../src/content/repositories/FollowMasterRepository'; -import { expect } from 'chai'; +import FollowMasterRepository, { + FollowMasterRepositoryImpl, +} from "../../../src/content/repositories/FollowMasterRepository"; +import { expect } from "chai"; -describe('FollowMasterRepositoryImpl', () => { +describe("FollowMasterRepositoryImpl", () => { let sut: FollowMasterRepository; before(() => { sut = new FollowMasterRepositoryImpl(); }); - describe('#getTags()/#addTag()/#clearTags()', () => { - it('gets, adds and clears tags', () => { + describe("#getTags()/#addTag()/#clearTags()", () => { + it("gets, adds and clears tags", () => { expect(sut.getTags()).to.be.empty; - sut.addTag('a'); - sut.addTag('b'); - sut.addTag('c'); - expect(sut.getTags()).to.deep.equal(['a', 'b', 'c']); + sut.addTag("a"); + sut.addTag("b"); + sut.addTag("c"); + expect(sut.getTags()).to.deep.equal(["a", "b", "c"]); sut.clearTags(); expect(sut.getTags()).to.be.empty; }); }); - describe('#getTagsByPrefix', () => { - it('gets tags matched by prefix', () => { - for (const tag of ['a', 'aa', 'ab', 'b', 'ba', 'bb']) { + describe("#getTagsByPrefix", () => { + it("gets tags matched by prefix", () => { + for (const tag of ["a", "aa", "ab", "b", "ba", "bb"]) { sut.addTag(tag); } - expect(sut.getTagsByPrefix('a')).to.deep.equal(['a', 'aa', 'ab']); - expect(sut.getTagsByPrefix('aa')).to.deep.equal(['aa']); - expect(sut.getTagsByPrefix('b')).to.deep.equal(['b', 'ba', 'bb']); - expect(sut.getTagsByPrefix('c')).to.be.empty; + expect(sut.getTagsByPrefix("a")).to.deep.equal(["a", "aa", "ab"]); + expect(sut.getTagsByPrefix("aa")).to.deep.equal(["aa"]); + expect(sut.getTagsByPrefix("b")).to.deep.equal(["b", "ba", "bb"]); + expect(sut.getTagsByPrefix("c")).to.be.empty; }); }); - describe('#setCurrentFollowMode()/#getCurrentNewTabMode()/#getCurrentBackgroundMode', () => { - it('updates and gets follow mode', () => { + describe("#setCurrentFollowMode()/#getCurrentNewTabMode()/#getCurrentBackgroundMode", () => { + it("updates and gets follow mode", () => { sut.setCurrentFollowMode(false, true); expect(sut.getCurrentNewTabMode()).to.be.false; expect(sut.getCurrentBackgroundMode()).to.be.true; |