ray-template/__test__/basic/getAppEnvironment.spec.ts
2024-03-23 11:25:28 +08:00

22 lines
486 B
TypeScript

import { getAppEnvironment } from '../../src/utils/basic'
describe('getAppEnvironment', () => {
it('should return MODE is test', () => {
const { MODE } = getAppEnvironment()
expect(MODE).toBe('test')
})
it('SSR should be false', () => {
const { SSR } = getAppEnvironment()
expect(SSR).toBe(false)
})
it('deconstruction value should be undefined', () => {
const { UNDEFINED_MODE } = getAppEnvironment()
expect(UNDEFINED_MODE).toBe(void 0)
})
})