1 import { isLocalEnvironment, isDevOrBlack } from './isDevOrBlack'
3 describe('isDevOrBlack', () => {
7 window.location = { host: '' }
9 it('isDev() should return true for local', () => {
10 window.location.host = 'proton.local'
11 expect(isLocalEnvironment()).toBe(true)
13 window.location.host = 'proton.local:3000'
14 expect(isLocalEnvironment()).toBe(true)
16 window.location.host = 'proton.me'
17 expect(isLocalEnvironment()).toBe(false)
20 it('isDevOrBlack() should return true for local and proton.black', () => {
21 window.location.host = 'proton.local'
22 expect(isDevOrBlack()).toBe(true)
24 window.location.host = 'proton.local:3000'
25 expect(isDevOrBlack()).toBe(true)
27 window.location.host = 'proton.black'
28 expect(isDevOrBlack()).toBe(true)
30 window.location.host = 'proton.me'
31 expect(isDevOrBlack()).toBe(false)