diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 11:10:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 11:10:36 +0900 |
commit | b1a6f374dca078dee2406ebe049715b826e37ca2 (patch) | |
tree | 5367c48648e2018f55f12d847baba94559e10040 /test/settings/components/form/SearchEngineForm.test.tsx | |
parent | b2dcdedad729ff7087867da50e20578f9fc8fb29 (diff) | |
parent | da72c2ddd916d79d134662e3985b53a4ac78af7a (diff) |
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'test/settings/components/form/SearchEngineForm.test.tsx')
-rw-r--r-- | test/settings/components/form/SearchEngineForm.test.tsx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/settings/components/form/SearchEngineForm.test.tsx b/test/settings/components/form/SearchEngineForm.test.tsx index 1f0420d..b918203 100644 --- a/test/settings/components/form/SearchEngineForm.test.tsx +++ b/test/settings/components/form/SearchEngineForm.test.tsx @@ -8,17 +8,17 @@ import { FormSearch } from 'shared/SettingData'; describe("settings/form/SearchForm", () => { describe('render', () => { it('renders SearchForm', () => { - let root = ReactTestRenderer.create(<SearchForm value={FormSearch.fromJSON({ + const root = ReactTestRenderer.create(<SearchForm value={FormSearch.fromJSON({ default: 'google', engines: [['google', 'google.com'], ['yahoo', 'yahoo.com']], })} />).root; - let names = root.findAllByProps({ name: 'name' }); + const names = root.findAllByProps({ name: 'name' }); expect(names).to.have.lengthOf(2); expect(names[0].props.value).to.equal('google'); expect(names[1].props.value).to.equal('yahoo'); - let urls = root.findAllByProps({ name: 'url' }); + const urls = root.findAllByProps({ name: 'url' }); expect(urls).to.have.lengthOf(2); expect(urls[0].props.value).to.equal('google.com'); expect(urls[1].props.value).to.equal('yahoo.com'); @@ -46,7 +46,7 @@ describe("settings/form/SearchForm", () => { engines: [['google', 'google.com'], ['yahoo', 'yahoo.com']] })} onChange={value => { - let json = value.toJSON(); + const json = value.toJSON(); expect(json.default).to.equal('louvre'); expect(json.engines).to.have.lengthOf(2) expect(json.engines).to.have.deep.members( @@ -56,10 +56,10 @@ describe("settings/form/SearchForm", () => { }} />, container); }); - let radio = document.querySelectorAll('input[type=radio]'); + const radio = document.querySelectorAll('input[type=radio]'); radio.checked = true; - let name = document.querySelector('input[name=name]'); + const name = document.querySelector('input[name=name]'); name.value = 'louvre'; ReactTestUtils.Simulate.change(name); @@ -72,7 +72,7 @@ describe("settings/form/SearchForm", () => { engines: [['louvre', 'google.com'], ['yahoo', 'yahoo.com']] })} onChange={value => { - let json = value.toJSON(); + const json = value.toJSON(); expect(json.default).to.equal('yahoo'); expect(json.engines).to.have.lengthOf(1) expect(json.engines).to.have.deep.members( @@ -82,7 +82,7 @@ describe("settings/form/SearchForm", () => { }} />, container); }); - let button = document.querySelector('input[type=button]'); + const button = document.querySelector('input[type=button]'); ReactTestUtils.Simulate.click(button); }); @@ -93,7 +93,7 @@ describe("settings/form/SearchForm", () => { engines: [['google', 'google.com']] })} onChange={value => { - let json = value.toJSON(); + const json = value.toJSON(); expect(json.default).to.equal('yahoo'); expect(json.engines).to.have.lengthOf(2) expect(json.engines).to.have.deep.members( @@ -103,7 +103,7 @@ describe("settings/form/SearchForm", () => { }} />, container); }); - let button = document.querySelector('input[type=button].ui-add-button'); + const button = document.querySelector('input[type=button].ui-add-button'); ReactTestUtils.Simulate.click(button); }); }); |