File size: 357 Bytes
f23825d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import NodeEnvironment from "jest-environment-node"

export default class CustomEnvironment extends NodeEnvironment {
  async setup() {
    await super.setup()
    // mock navigator.language
    this.global.navigator = {
      language: "en",
    } as Navigator
    this.global.location = {
      href: "https://signal.vercel.app/",
    } as Location
  }
}