__tests__/_mock.ts
Function performance
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
performance: () => {
delete (window as any).performance;
const performance = {
clearMarks: jest.fn(),
// https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByName
Function getEntriesByType
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getEntriesByType: (entryType: string) => {
if (entryType === 'navigation') {
return [
{
connectEnd: 1.7850000876933336,
Function navigator
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
navigator: () => {
delete (window as any).navigator;
const navigator = {
connection: {
effectiveType: '4g',