aboutsummaryrefslogtreecommitdiff
path: root/test/content/repositories/SettingRepository.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/repositories/SettingRepository.test.ts')
-rw-r--r--test/content/repositories/SettingRepository.test.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/content/repositories/SettingRepository.test.ts b/test/content/repositories/SettingRepository.test.ts
new file mode 100644
index 0000000..fea70b7
--- /dev/null
+++ b/test/content/repositories/SettingRepository.test.ts
@@ -0,0 +1,30 @@
+import { SettingRepositoryImpl } from '../../../src/content/repositories/SettingRepository';
+import { expect } from 'chai';
+
+describe('SettingRepositoryImpl', () => {
+ it('updates and gets current value', () => {
+ let sut = new SettingRepositoryImpl();
+
+ let settings = {
+ 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');
+ });
+});
+