Use Settings.toJSON on test
This commit is contained in:
parent
532eeb5a1d
commit
b77a473498
1 changed files with 3 additions and 18 deletions
|
@ -58,12 +58,7 @@ describe('shared/SettingData', () => {
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
let settings = JSONTextSettings.fromText(o).toSettings();
|
let settings = JSONTextSettings.fromText(o).toSettings();
|
||||||
expect({
|
expect(settings.toJSON()).to.deep.equal(JSON.parse(o));
|
||||||
keymaps: settings.keymaps.toJSON(),
|
|
||||||
search: settings.search.toJSON(),
|
|
||||||
properties: settings.properties.toJSON(),
|
|
||||||
blacklist: settings.blacklist.toJSON(),
|
|
||||||
}).to.deep.equal(JSON.parse(o));
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -86,12 +81,7 @@ describe('shared/SettingData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
let json = JSONTextSettings.fromSettings(o).toJSONText();
|
let json = JSONTextSettings.fromSettings(o).toJSONText();
|
||||||
expect(JSON.parse(json)).to.deep.equal({
|
expect(JSON.parse(json)).to.deep.equal(o.toJSON());
|
||||||
keymaps: o.keymaps.toJSON(),
|
|
||||||
search: o.search.toJSON(),
|
|
||||||
properties: o.properties.toJSON(),
|
|
||||||
blacklist: o.blacklist.toJSON(),
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -119,12 +109,7 @@ describe('shared/SettingData', () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
let settings = FormSettings.fromJSON(data).toSettings();
|
let settings = FormSettings.fromJSON(data).toSettings();
|
||||||
expect({
|
expect(settings.toJSON()).to.deep.equal({
|
||||||
keymaps: settings.keymaps.toJSON(),
|
|
||||||
search: settings.search.toJSON(),
|
|
||||||
properties: settings.properties.toJSON(),
|
|
||||||
blacklist: settings.blacklist.toJSON(),
|
|
||||||
}).to.deep.equal({
|
|
||||||
keymaps: {
|
keymaps: {
|
||||||
'j': { type: 'scroll.vertically', count: 1 },
|
'j': { type: 'scroll.vertically', count: 1 },
|
||||||
'0': { type: 'scroll.home' },
|
'0': { type: 'scroll.home' },
|
||||||
|
|
Reference in a new issue