@sdc-monitor/demo
Version:
<div align="center"> <a href="#" target="_blank"> <img src="https://i.loli.net/2021/07/28/EvPwd4NjVH3tBfO.jpg" alt="mito-logo" height="90"> </a> <p>A Lightweight SDK For Monitor Web</p>
20 lines (16 loc) • 515 B
text/typescript
import { getGlobal, isBrowserEnv, isNodeEnv, isWxMiniEnv } from '../src'
describe('global.ts', () => {
it('should getGLoabl func work', () => {
const _window = getGlobal()
expect(_window).toBe(window)
})
it('should env variable work', () => {
expect(isNodeEnv).toBeTruthy()
expect(isWxMiniEnv).toBeFalsy()
// mock browser env by node
expect(isBrowserEnv).toBeTruthy()
})
// it('should supportsHistory func work', () => {
// expect(supportsHistory()).toBeTruthy()
// })
})