From 574692551a27ea56660bf2061daeaa0d34beaff4 Mon Sep 17 00:00:00 2001 From: Shin'ya UEOKA Date: Sat, 5 Oct 2019 02:06:02 +0000 Subject: Make Properties class --- test/shared/SettingData.test.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'test/shared/SettingData.test.ts') diff --git a/test/shared/SettingData.test.ts b/test/shared/SettingData.test.ts index f8995d9..b5bf70e 100644 --- a/test/shared/SettingData.test.ts +++ b/test/shared/SettingData.test.ts @@ -5,6 +5,7 @@ import Settings from '../../src/shared/Settings'; import { expect } from 'chai'; import Keymaps from '../../src/shared/settings/Keymaps'; import Search from '../../src/shared/settings/Search'; +import Properties from '../../src/shared/settings/Properties'; describe('shared/SettingData', () => { describe('FormKeymaps', () => { @@ -62,7 +63,7 @@ describe('shared/SettingData', () => { expect({ keymaps: settings.keymaps.toJSON(), search: settings.search.toJSON(), - properties: settings.properties, + properties: settings.properties.toJSON(), blacklist: settings.blacklist, }).to.deep.equal(JSON.parse(o)); }); @@ -78,11 +79,11 @@ describe('shared/SettingData', () => { google: "https://google.com/search?q={}", }, }), - properties: { + properties: Properties.fromJSON({ hintchars: "abcdefghijklmnopqrstuvwxyz", smoothscroll: false, complete: "sbh" - }, + }), blacklist: [], }; @@ -90,7 +91,7 @@ describe('shared/SettingData', () => { expect(JSON.parse(json)).to.deep.equal({ keymaps: o.keymaps.toJSON(), search: o.search.toJSON(), - properties: o.properties, + properties: o.properties.toJSON(), blacklist: o.blacklist, }); }); @@ -123,7 +124,7 @@ describe('shared/SettingData', () => { expect({ keymaps: settings.keymaps.toJSON(), search: settings.search.toJSON(), - properties: settings.properties, + properties: settings.properties.toJSON(), blacklist: settings.blacklist, }).to.deep.equal({ keymaps: { @@ -159,11 +160,11 @@ describe('shared/SettingData', () => { "google": "https://google.com/search?q={}" } }), - properties: { + properties: Properties.fromJSON({ hintchars: "abcdefghijklmnopqrstuvwxyz", smoothscroll: false, complete: "sbh" - }, + }), blacklist: [] }; -- cgit v1.2.3