-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update jest to v24 #31825
Update jest to v24 #31825
Changes from all commits
a51433c
407f05f
50d304f
b720d65
6fa51a7
ceca217
4965ef2
86b04fa
ec6a293
a10c162
443a965
a220c7a
126797b
7c872e1
bdc51f4
25652e2
d15a588
1d94ac9
cf67999
b4fa793
d50fc60
a83aaf8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"exclude": [ | ||
"dist" | ||
], | ||
"include": [ | ||
"./src/**/*.ts", | ||
"./types/index.d.ts" | ||
], | ||
"compilerOptions": { | ||
"types": [ | ||
"jest", | ||
"node" | ||
] | ||
} | ||
} | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"exclude": [ | ||
"dist" | ||
], | ||
"include": [ | ||
"./src/**/*.ts" | ||
], | ||
"compilerOptions": { | ||
"types": [ | ||
"jest", | ||
"node" | ||
] | ||
} | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ exports[`#start constructs UiSettingsClient and UiSettingsApi: UiSettingsApi arg | |
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"type": "return", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These snapshots look like they're testing more jest internals rather than just the call arguments themselves. Can we fix these too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mocked functions are inside JS objects that serialised for snapshot testing. I didn't find a cheap way to fix it and decided to keep it as is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perfectly good reason. |
||
"value": undefined, | ||
}, | ||
], | ||
|
@@ -31,7 +31,7 @@ exports[`#start constructs UiSettingsClient and UiSettingsApi: UiSettingsClient | |
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"type": "return", | ||
"value": Object { | ||
"loadingCountObservable": true, | ||
}, | ||
|
@@ -52,7 +52,7 @@ exports[`#start constructs UiSettingsClient and UiSettingsApi: UiSettingsClient | |
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
|
@@ -70,7 +70,7 @@ exports[`#start passes the uiSettings loading count to the loading count api: ht | |
], | ||
"results": Array [ | ||
Object { | ||
"isThrow": false, | ||
"type": "return", | ||
"value": undefined, | ||
}, | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,8 +91,7 @@ test('throws if [redirectHttpFromPort] is in use', async () => { | |
} as HttpConfig) | ||
).rejects.toMatchSnapshot(); | ||
|
||
// Workaround for https://github.com/DefinitelyTyped/DefinitelyTyped/issues/17605. | ||
(mockListen as any).mockRestore(); | ||
mockListen.mockRestore(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seems this is an incorrect way to restore mocks. this code is unreachable if assertion fails. am I right? should I create another issue to fix all such cases? @joshdover There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah that's a good catch. Could push the mock into an array that gets cleaned up in an |
||
}); | ||
|
||
test('forwards http requests to https', async () => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: how about updating
babel-jest
to24.1.0
here and inx-pack
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babel-jest@v24
usesbabel@v7
which require@kbn/babel-preset/node_preset
update. seems like quite a bit taskThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be done in #32326