A fork of https://github.com/ueokande/vim-vixen
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
716 B
32 lines
716 B
6 years ago
|
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;
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
|