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 e1205d5 commit b5a5dcfCopy full SHA for b5a5dcf
test/unit/index.js
@@ -1,3 +1,17 @@
1
+// mock passive event listener support and upsupport
2
+(() => {
3
+ const originAddListener = window.addEventListener;
4
+ let flag;
5
+
6
+ window.addEventListener = (...args) => {
7
+ // try to read passive property and only read once time if it is accessible
8
+ if (!flag && args[2] && args[2].passive) {
9
+ flag = false;
10
+ }
11
+ originAddListener.apply(window, args);
12
+ };
13
+})();
14
15
const testsContext = require.context('./specs', true, /\.spec$/);
16
testsContext.keys().forEach(testsContext);
17
0 commit comments