wx.test.js 413 B

123456789101112131415161718
  1. const _ = require('./utils')
  2. test('wx.getSystemInfo', async () => {
  3. wx.getSystemInfo({
  4. success(res) {
  5. expect(res.errMsg).toBe('getSystemInfo:ok')
  6. },
  7. complete(res) {
  8. expect(res.errMsg).toBe('getSystemInfo:ok')
  9. },
  10. })
  11. })
  12. test('wx.getSystemInfoSync', async () => {
  13. const info = wx.getSystemInfoSync()
  14. expect(info.SDKVersion).toBe('2.4.1')
  15. expect(info.version).toBe('6.6.3')
  16. })