aboutsummaryrefslogtreecommitdiff
path: root/test/content/components/common
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2019-05-02 14:08:51 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2019-05-05 23:59:59 +0900
commitd01db82c0dca352de2d7644c383d388fc3ec0366 (patch)
treeff09ebc545ce00192dff9e1119b0c9e2cf92fdef /test/content/components/common
parent992b3ac65d7fe86ac7bc3b560960c8bcf86bec69 (diff)
Types src/content
Diffstat (limited to 'test/content/components/common')
-rw-r--r--test/content/components/common/input.test.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/content/components/common/input.test.ts b/test/content/components/common/input.test.ts
index 2ba5507..f3a943c 100644
--- a/test/content/components/common/input.test.ts
+++ 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);