diff options
author | Shin'ya UEOKA <ueokande@i-beam.org> | 2019-10-07 12:43:55 +0000 |
---|---|---|
committer | Shin'ya UEOKA <ueokande@i-beam.org> | 2019-10-07 12:44:26 +0000 |
commit | b77a4734985722e96066e713f3b1b9e81a6e1811 (patch) | |
tree | 6e64967f6cfa33af46f6c15b4f4fd43bb10683ca /test/shared | |
parent | 532eeb5a1d9712676a9b3730bb7b27134c57831b (diff) |
Use Settings.toJSON on test
Diffstat (limited to 'test/shared')
-rw-r--r-- | test/shared/SettingData.test.ts | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/test/shared/SettingData.test.ts b/test/shared/SettingData.test.ts index d95c271..5de7770 100644 --- a/test/shared/SettingData.test.ts +++ b/test/shared/SettingData.test.ts @@ -58,12 +58,7 @@ describe('shared/SettingData', () => { }`; let settings = JSONTextSettings.fromText(o).toSettings(); - expect({ - keymaps: settings.keymaps.toJSON(), - search: settings.search.toJSON(), - properties: settings.properties.toJSON(), - blacklist: settings.blacklist.toJSON(), - }).to.deep.equal(JSON.parse(o)); + expect(settings.toJSON()).to.deep.equal(JSON.parse(o)); }); }); @@ -86,12 +81,7 @@ describe('shared/SettingData', () => { }); let json = JSONTextSettings.fromSettings(o).toJSONText(); - expect(JSON.parse(json)).to.deep.equal({ - keymaps: o.keymaps.toJSON(), - search: o.search.toJSON(), - properties: o.properties.toJSON(), - blacklist: o.blacklist.toJSON(), - }); + expect(JSON.parse(json)).to.deep.equal(o.toJSON()); }); }); }); @@ -119,12 +109,7 @@ describe('shared/SettingData', () => { }; let settings = FormSettings.fromJSON(data).toSettings(); - expect({ - keymaps: settings.keymaps.toJSON(), - search: settings.search.toJSON(), - properties: settings.properties.toJSON(), - blacklist: settings.blacklist.toJSON(), - }).to.deep.equal({ + expect(settings.toJSON()).to.deep.equal({ keymaps: { 'j': { type: 'scroll.vertically', count: 1 }, '0': { type: 'scroll.home' }, |