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/SettingRepository.test.ts
2019-10-06 12:58:59 +00:00

30 lines
772 B
TypeScript

import { SettingRepositoryImpl } from '../../../src/content/repositories/SettingRepository';
import { expect } from 'chai';
import Settings from '../../../src/shared/settings/Settings';
describe('SettingRepositoryImpl', () => {
it('updates and gets current value', () => {
let sut = new SettingRepositoryImpl();
let settings = Settings.fromJSON({
keymaps: {},
search:{
default: 'google',
engines: {
google: 'https://google.com/?q={}',
}
},
properties: {
hintchars: 'abcd1234',
smoothscroll: false,
complete: 'sbh',
},
blacklist: [],
});
sut.set(settings);
let actual = sut.get();
expect(actual.properties.hintchars).to.equal('abcd1234');
});
});