Blame view

node_modules/better-scroll/test/unit/specs/modules/debug.js 334 Bytes
aaac7fed   liuqimichale   add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  import { warn } from 'scroll/util/debug'
  
  describe('debug.js', () => {
    it('#warn()', () => {
      const originErr = console.error
      const error = sinon.spy()
      console.error = error
      const msg = 'test msg'
      warn(msg)
      expect(error)
        .to.be.calledWith(`[BScroll warn]: ${msg}`)
      console.error = originErr
    })
  })