We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e42bd0c commit 0087fd3Copy full SHA for 0087fd3
test/spec.menu.js
@@ -63,4 +63,22 @@ describe('Deck JS Menu', function() {
63
expect($(dsc)).not.toHaveClass(defaults.classes.menu);
64
});
65
66
-});
+
67
+ describe('touch bindings', function() {
68
+ var estart;
69
+ var eend;
70
71
+ beforeEach(function() {
72
+ estart = jQuery.Event('touchstart.deckmenu');
73
+ eend = jQuery.Event('touchend.deckmenu');
74
+ });
75
76
+ it('should toggle the menu if the screen is touched', function() {
77
+ $.deck('getOptions').touch.doubletapWindow = Date.now() + 100000;
78
+ $.deck('getContainer').trigger(estart);
79
+ $.deck('getContainer').trigger(eend);
80
+ expect($(dsc)).toHaveClass(defaults.classes.menu);
81
82
83
84
+});
0 commit comments