aboutsummaryrefslogtreecommitdiff
path: root/test/settings/components/form
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/settings/components/form
parent16352502cf9396a9d573c2953940c31f4980c282 (diff)
Rename valueOf to fromJSON
Diffstat (limited to 'test/settings/components/form')
-rw-r--r--test/settings/components/form/KeymapsForm.test.tsx4
-rw-r--r--test/settings/components/form/SearchEngineForm.test.tsx8
2 files changed, 6 insertions, 6 deletions
diff --git a/test/settings/components/form/KeymapsForm.test.tsx b/test/settings/components/form/KeymapsForm.test.tsx
index dc2322b..1d1e77c 100644
--- a/test/settings/components/form/KeymapsForm.test.tsx
+++ b/test/settings/components/form/KeymapsForm.test.tsx
@@ -9,7 +9,7 @@ import { expect } from 'chai';
describe("settings/form/KeymapsForm", () => {
describe('render', () => {
it('renders keymap fields', () => {
- let root = ReactTestRenderer.create(<KeymapsForm value={FormKeymaps.valueOf({
+ let root = ReactTestRenderer.create(<KeymapsForm value={FormKeymaps.fromJSON({
'scroll.vertically?{"count":1}': 'j',
'scroll.vertically?{"count":-1}': 'k',
})} />).root
@@ -48,7 +48,7 @@ describe("settings/form/KeymapsForm", () => {
it('invokes onChange event on edit', (done) => {
ReactTestUtils.act(() => {
ReactDOM.render(<KeymapsForm
- value={FormKeymaps.valueOf({
+ value={FormKeymaps.fromJSON({
'scroll.vertically?{"count":1}': 'j',
'scroll.vertically?{"count":-1}': 'k',
})}
diff --git a/test/settings/components/form/SearchEngineForm.test.tsx b/test/settings/components/form/SearchEngineForm.test.tsx
index 0e6b17d..1f0420d 100644
--- a/test/settings/components/form/SearchEngineForm.test.tsx
+++ b/test/settings/components/form/SearchEngineForm.test.tsx
@@ -8,7 +8,7 @@ import { FormSearch } from 'shared/SettingData';
describe("settings/form/SearchForm", () => {
describe('render', () => {
it('renders SearchForm', () => {
- let root = ReactTestRenderer.create(<SearchForm value={FormSearch.valueOf({
+ let root = ReactTestRenderer.create(<SearchForm value={FormSearch.fromJSON({
default: 'google',
engines: [['google', 'google.com'], ['yahoo', 'yahoo.com']],
})} />).root;
@@ -41,7 +41,7 @@ describe("settings/form/SearchForm", () => {
it('invokes onChange event on edit', (done) => {
ReactTestUtils.act(() => {
ReactDOM.render(<SearchForm
- value={FormSearch.valueOf({
+ value={FormSearch.fromJSON({
default: 'google',
engines: [['google', 'google.com'], ['yahoo', 'yahoo.com']]
})}
@@ -67,7 +67,7 @@ describe("settings/form/SearchForm", () => {
it('invokes onChange event on delete', (done) => {
ReactTestUtils.act(() => {
- ReactDOM.render(<SearchForm value={FormSearch.valueOf({
+ ReactDOM.render(<SearchForm value={FormSearch.fromJSON({
default: 'yahoo',
engines: [['louvre', 'google.com'], ['yahoo', 'yahoo.com']]
})}
@@ -88,7 +88,7 @@ describe("settings/form/SearchForm", () => {
it('invokes onChange event on add', (done) => {
ReactTestUtils.act(() => {
- ReactDOM.render(<SearchForm value={FormSearch.valueOf({
+ ReactDOM.render(<SearchForm value={FormSearch.fromJSON({
default: 'yahoo',
engines: [['google', 'google.com']]
})}