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.
27 lines
709 B
27 lines
709 B
6 years ago
|
import MarkRepository from 'background/repositories/MarkRepository';
|
||
|
import GlobalMark from 'background/domains/GlobalMark';
|
||
6 years ago
|
|
||
6 years ago
|
describe('background/repositories/mark', () => {
|
||
6 years ago
|
let repository;
|
||
|
|
||
|
beforeEach(() => {
|
||
|
repository = new MarkRepository;
|
||
|
});
|
||
|
|
||
|
it('get and set', async() => {
|
||
6 years ago
|
let mark = new GlobalMark(1, 'http://example.com', 10, 30);
|
||
6 years ago
|
|
||
|
repository.setMark('A', mark);
|
||
|
|
||
|
let got = await repository.getMark('A');
|
||
|
expect(got).to.be.a('object');
|
||
|
expect(got.tabId).to.equal(1);
|
||
6 years ago
|
expect(got.url).to.equal('http://example.com');
|
||
|
expect(got.x).to.equal(10);
|
||
|
expect(got.y).to.equal(30);
|
||
6 years ago
|
|
||
|
got = await repository.getMark('B');
|
||
|
expect(got).to.be.undefined;
|
||
|
});
|
||
|
});
|