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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

31 lines
716 B

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;
});
});
});