mirror of
https://github.com/prymitive/karma
synced 2026-05-13 03:56:59 +00:00
Fix is-in-viewport mock to return true
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
const $ = require("jquery");
|
||||
|
||||
function isInViewport() {}
|
||||
// always returns true, indicating that every tested element is in viewport
|
||||
function isInViewport() {
|
||||
return true;
|
||||
}
|
||||
$.extend($.expr[":"], {
|
||||
"in-viewport": $.expr.createPseudo
|
||||
? $.expr.createPseudo(argsString => currElement => isInViewport(currElement, argsString))
|
||||
: (currObj, index, meta) => isInViewport(currObj, meta)
|
||||
})
|
||||
|
||||
function run() {}
|
||||
$.fn.run = run
|
||||
|
||||
Reference in New Issue
Block a user