import React from "react" ; import { AuthProvider , AuthProviderProps } from "../src/AuthProvider" ; export const createWrapper = ( opts ) => ( { children , } ) : JSX . Element => ( < AuthProvider { ... opts } > { children } < /AuthProvider>); export const createLocation = ( search , hash ) : Location => { const location = { search , hash , host : "www.example.com" , protocol : "https:" , ancestorOrigins : { } as DOMStringList , href : "" , hostname : "" , origin : "" , pathname : "" , port : "80" , assign : jest . fn ( ) , reload : jest . fn ( ) , replace : jest . fn ( ) , } ; return location ; } ;