summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-07-19 12:42:00 +0100
committerErik Larkö <erik@mullvad.net>2017-07-20 09:46:36 +0200
commit2ea377f3bd30a1e8d1d6392fcd224e82ff418601 (patch)
treed64c0f23e9cb6cf30816b3e3c648168ec1715450 /test
parentfea816c3138b43c51d6ddcc7303704ca8e70bdfd (diff)
downloadmullvadvpn-2ea377f3bd30a1e8d1d6392fcd224e82ff418601.tar.xz
mullvadvpn-2ea377f3bd30a1e8d1d6392fcd224e82ff418601.zip
Mock "change" event
Diffstat (limited to 'test')
-rw-r--r--test/components/Switch.spec.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/components/Switch.spec.js b/test/components/Switch.spec.js
index 78258b1d40..8cdc053c24 100644
--- a/test/components/Switch.spec.js
+++ b/test/components/Switch.spec.js
@@ -19,9 +19,7 @@ describe('components/Switch', () => {
Simulate.mouseDown(domNode, { clientX: 100, clientY: 0 });
Simulate.mouseUp(domNode, { clientX: 100, clientY: 0 });
-
- domNode.checked = true;
- Simulate.change(domNode);
+ Simulate.change(domNode, { target: { checked: true } });
});
it('should switch off', (done) => {
@@ -36,9 +34,7 @@ describe('components/Switch', () => {
Simulate.mouseDown(domNode, { clientX: 100, clientY: 0 });
Simulate.mouseUp(domNode, { clientX: 100, clientY: 0 });
-
- domNode.checked = false;
- Simulate.change(domNode);
+ Simulate.change(domNode, { target: { checked: false } });
});
it('should handle left to right swipe', (done) => {