Skip to content

Commit 71319b4

Browse files
committed
fix the ui unit testing
1 parent 1784228 commit 71319b4

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

console/atest-ui/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

console/atest-ui/src/views/__test__/net.spec.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ beforeEach(() => {
2828

2929
describe('net', () => {
3030
test('GetVersion', () => {
31-
fetchMock.mockResponseOnce(`{"version":"v0.0.2"}`)
31+
fetchMock.mockResponseOnce(`{"version":"v0.0.2"}`, {
32+
headers: {
33+
'Content-Type': 'application/json'
34+
}
35+
})
3236
API.GetVersion((d) => {
3337
expect(d.version).toEqual('v0.0.2')
3438
})

0 commit comments

Comments
 (0)