chore: remove istanbul ignore
This commit is contained in:
@@ -9,7 +9,6 @@ if (inBrowser) {
|
||||
Object.defineProperty(opts, 'passive', {
|
||||
// eslint-disable-next-line getter-return
|
||||
get() {
|
||||
/* istanbul ignore next */
|
||||
supportsPassive = true;
|
||||
},
|
||||
});
|
||||
|
||||
@@ -6,7 +6,6 @@ import { inBrowser } from '..';
|
||||
|
||||
let prev = Date.now();
|
||||
|
||||
/* istanbul ignore next */
|
||||
function fallback(fn: FrameRequestCallback): number {
|
||||
const curr = Date.now();
|
||||
const ms = Math.max(0, 16 - (curr - prev));
|
||||
@@ -15,13 +14,10 @@ function fallback(fn: FrameRequestCallback): number {
|
||||
return id;
|
||||
}
|
||||
|
||||
/* istanbul ignore next */
|
||||
const root = (inBrowser ? window : global) as Window;
|
||||
|
||||
/* istanbul ignore next */
|
||||
const iRaf = root.requestAnimationFrame || fallback;
|
||||
|
||||
/* istanbul ignore next */
|
||||
const iCancel = root.cancelAnimationFrame || root.clearTimeout;
|
||||
|
||||
export function raf(fn: FrameRequestCallback): number {
|
||||
|
||||
@@ -8,7 +8,6 @@ import { getRootScrollTop, setRootScrollTop } from './scroll';
|
||||
|
||||
const isIOS = checkIsIOS();
|
||||
|
||||
/* istanbul ignore next */
|
||||
export function resetScroll() {
|
||||
if (isIOS) {
|
||||
setRootScrollTop(getRootScrollTop());
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { inBrowser } from '..';
|
||||
|
||||
export function isAndroid(): boolean {
|
||||
/* istanbul ignore next */
|
||||
return inBrowser ? /android/.test(navigator.userAgent.toLowerCase()) : false;
|
||||
}
|
||||
|
||||
export function isIOS(): boolean {
|
||||
/* istanbul ignore next */
|
||||
return inBrowser
|
||||
? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase())
|
||||
: false;
|
||||
|
||||
Reference in New Issue
Block a user