-
-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathjest.setup.ts
More file actions
29 lines (26 loc) · 670 Bytes
/
Copy pathjest.setup.ts
File metadata and controls
29 lines (26 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import '@testing-library/jest-dom'
import { TextDecoder, TextEncoder } from 'util'
import 'whatwg-fetch'
Object.assign(global, {
TextDecoder,
TextEncoder,
__BROWSER__: 'chrome',
__RELEASE_NAME__: 'test',
__DEV__: false,
__TEST__: true,
__PROD__: false,
__CHROME__: true,
__FIREFOX__: false,
__GECKO__: false,
__EDGE__: false,
__CHROMIUM__: true,
__SAFARI__: false,
__LOGGING__: false,
__METRICS__: false,
})
// Monkey patch for webextension-polyfill
chrome.runtime.id = 'TEST'
process.env.IDENTITY_POOL_ID = 'pool-id'
process.env.IDENTITY_POOL_REGION = 'region'
process.env.API_KEY = 'api_key'
process.env.API_HOSTNAME = 'somewhere.com'