Skip to content

Commit

Permalink
fix(h5): fix the broken UT for request (#7798)
Browse files Browse the repository at this point in the history
introduced with #3659

Co-authored-by: Li,Weitao <[email protected]>
  • Loading branch information
yuezk and luckyadam authored Oct 9, 2020
1 parent 89e0ef0 commit d963ff2
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 @@ -41,5 +41,8 @@
"mobile-detect": "^1.4.2",
"raf": "^3.4.1",
"whatwg-fetch": "^3.4.0"
},
"devDependencies": {
"jest-fetch-mock": "^3.0.3"
}
}

0 comments on commit d963ff2

Please sign in to comment.