Skip to content

Commit

Permalink
fix(h5): fix the broken UT
Browse files Browse the repository at this point in the history
introduced with NervJS#3659
  • Loading branch information
yuezk committed Oct 9, 2020
1 parent 93c6d6e commit d09c0ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-h5/__test__/request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('request', () => {
complete
})
.then(res => {
expect(fetch.mock.calls[0][0]).toBe('https://github.com?x=123&y=abc&z=1%2C2%2C3')
expect(fetch.mock.calls[0][0]).toBe('https://github.com?x=123&y=abc&z=%5B1%2C2%2C3%5D')
expect(res.statusCode).toBe(200)
expect(res.data).toEqual({
data: '12345'
Expand Down
3 changes: 3 additions & 0 deletions packages/taro-h5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@
"raf": "^3.4.1",
"unfetch": "^4.1.0",
"whatwg-fetch": "^2.0.4"
},
"devDependencies": {
"jest-fetch-mock": "^3.0.3"
}
}

0 comments on commit d09c0ae

Please sign in to comment.