aboutsummaryrefslogtreecommitdiff
path: root/test/shared
diff options
context:
space:
mode:
authorShin'ya UEOKA <ueokande@i-beam.org>2019-10-07 12:02:02 +0000
committerShin'ya UEOKA <ueokande@i-beam.org>2019-10-07 12:31:13 +0000
commit532eeb5a1d9712676a9b3730bb7b27134c57831b (patch)
tree1cc0360426f383f0cc6a9396d6f591917ed76faf /test/shared
parent16352502cf9396a9d573c2953940c31f4980c282 (diff)
Rename valueOf to fromJSON
Diffstat (limited to 'test/shared')
-rw-r--r--test/shared/SettingData.test.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/shared/SettingData.test.ts b/test/shared/SettingData.test.ts
index 138d768..d95c271 100644
--- a/test/shared/SettingData.test.ts
+++ b/test/shared/SettingData.test.ts
@@ -14,7 +14,7 @@ describe('shared/SettingData', () => {
'scroll.home': '0',
};
- let keymaps = FormKeymaps.valueOf(data).toKeymaps().toJSON();
+ let keymaps = FormKeymaps.fromJSON(data).toKeymaps().toJSON();
expect(keymaps).to.deep.equal({
'j': { type: 'scroll.vertically', count: 1 },
'0': { type: 'scroll.home' },
@@ -118,7 +118,7 @@ describe('shared/SettingData', () => {
blacklist: []
};
- let settings = FormSettings.valueOf(data).toSettings();
+ let settings = FormSettings.fromJSON(data).toSettings();
expect({
keymaps: settings.keymaps.toJSON(),
search: settings.search.toJSON(),
@@ -211,7 +211,7 @@ describe('shared/SettingData', () => {
}`,
};
- let j = SettingData.valueOf(data).toJSON();
+ let j = SettingData.fromJSON(data).toJSON();
expect(j.source).to.equal('json');
expect(j.json).to.be.a('string');
});
@@ -236,7 +236,7 @@ describe('shared/SettingData', () => {
},
};
- let j = SettingData.valueOf(data).toJSON();
+ let j = SettingData.fromJSON(data).toJSON();
expect(j.source).to.equal('form');
expect(j.form).to.deep.equal({
keymaps: {},
@@ -277,7 +277,7 @@ describe('shared/SettingData', () => {
}`,
};
- let settings = SettingData.valueOf(data).toSettings();
+ let settings = SettingData.fromJSON(data).toSettings();
expect(settings.search.defaultEngine).to.equal('google');
});
@@ -301,7 +301,7 @@ describe('shared/SettingData', () => {
},
};
- let settings = SettingData.valueOf(data).toSettings();
+ let settings = SettingData.fromJSON(data).toSettings();
expect(settings.search.defaultEngine).to.equal('yahoo');
});
});