diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-07 21:16:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-07 21:16:47 +0900 |
commit | 05ef6a8ca35aaa801c11eb6b4896caa3690058af (patch) | |
tree | 2c7708ca91ac2b462cc86aa28612e3d3943496f3 /test/content/components/common | |
parent | 457d954e08923b4accd28a919c72d0b61db1bb98 (diff) | |
parent | 27d0a7f37d24a0ad68a8ccb7dee18fc1d00eea58 (diff) |
Merge pull request #578 from ueokande/move-to-typescript
Move to TypeScript
Diffstat (limited to 'test/content/components/common')
-rw-r--r-- | test/content/components/common/follow.test.ts (renamed from test/content/components/common/follow.test.js) | 0 | ||||
-rw-r--r-- | test/content/components/common/hint.test.ts (renamed from test/content/components/common/hint.test.js) | 0 | ||||
-rw-r--r-- | test/content/components/common/input.test.ts (renamed from test/content/components/common/input.test.js) | 14 |
3 files changed, 8 insertions, 6 deletions
diff --git a/test/content/components/common/follow.test.js b/test/content/components/common/follow.test.ts index 90d6cf5..90d6cf5 100644 --- a/test/content/components/common/follow.test.js +++ b/test/content/components/common/follow.test.ts diff --git a/test/content/components/common/hint.test.js b/test/content/components/common/hint.test.ts index 42d571f..42d571f 100644 --- a/test/content/components/common/hint.test.js +++ b/test/content/components/common/hint.test.ts diff --git a/test/content/components/common/input.test.js b/test/content/components/common/input.test.ts index 2ba5507..f3a943c 100644 --- a/test/content/components/common/input.test.js +++ b/test/content/components/common/input.test.ts @@ -21,12 +21,14 @@ describe('InputComponent', () => { ++b; } }); - component.onKeyDown({ key: 'a' }); - component.onKeyDown({ key: 'b' }); - component.onKeyPress({ key: 'a' }); - component.onKeyUp({ key: 'a' }); - component.onKeyPress({ key: 'b' }); - component.onKeyUp({ key: 'b' }); + + let elem = document.body; + component.onKeyDown({ key: 'a', target: elem }); + component.onKeyDown({ key: 'b', target: elem }); + component.onKeyPress({ key: 'a', target: elem }); + component.onKeyUp({ key: 'a', target: elem }); + component.onKeyPress({ key: 'b', target: elem }); + component.onKeyUp({ key: 'b', target: elem }); expect(a).is.equals(1); expect(b).is.equals(1); |