This repository has been archived on 2020-04-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Vim-Vixen/test/content/repositories/FollowKeyRepository.test.ts
2019-05-19 15:36:14 +09:00

31 lines
716 B
TypeScript

import FollowKeyRepository, { FollowKeyRepositoryImpl }
from '../../../src/content/repositories/FollowKeyRepository';
import { expect } from 'chai';
describe('FollowKeyRepositoryImpl', () => {
let sut: FollowKeyRepository;
before(() => {
sut = new FollowKeyRepositoryImpl();
});
describe('#getKeys()/#pushKey()/#popKey()', () => {
it('enqueues keys', () => {
expect(sut.getKeys()).to.be.empty;
sut.pushKey('a');
sut.pushKey('b');
sut.pushKey('c');
expect(sut.getKeys()).to.deep.equal(['a', 'b', 'c']);
sut.popKey();
expect(sut.getKeys()).to.deep.equal(['a', 'b']);
sut.clearKeys();
expect(sut.getKeys()).to.be.empty;
});
});
});