Jest update v26.6.3 -> v29.5.1
Summary: ^ Basically, update Jest and fix any raised issues. Mainly: - Update necessary dependencies - Update snapshots - `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx` - `mocked` -> `jest.mocked` Changelog: Update Jest to v29.5.1 Reviewed By: antonk52 Differential Revision: D46319818 fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
94cb8935b2
commit
6430403da0
@@ -54,8 +54,8 @@ describe('ChangelogSheet', () => {
|
||||
test('with last header, should not show changes', () => {
|
||||
markChangelogRead(storage, changelog);
|
||||
expect(storage.data).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"FlipperChangelogStatus": "{\\"lastHeader\\":\\"# Version 2.0\\"}",
|
||||
{
|
||||
"FlipperChangelogStatus": "{"lastHeader":"# Version 2.0"}",
|
||||
}
|
||||
`);
|
||||
expect(hasNewChangesToShow(storage, changelog)).toBe(false);
|
||||
@@ -74,18 +74,18 @@ ${changelog}
|
||||
|
||||
expect(hasNewChangesToShow(storage, newChangelog)).toBe(true);
|
||||
expect(getRecentChangelog(storage, newChangelog)).toMatchInlineSnapshot(`
|
||||
"# Version 3.0
|
||||
"# Version 3.0
|
||||
|
||||
* Cool!
|
||||
* Cool!
|
||||
|
||||
# Version 2.5
|
||||
# Version 2.5
|
||||
|
||||
* This is visible as well"
|
||||
`);
|
||||
* This is visible as well"
|
||||
`);
|
||||
markChangelogRead(storage, newChangelog);
|
||||
expect(storage.data).toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"FlipperChangelogStatus": "{\\"lastHeader\\":\\"# Version 3.0\\"}",
|
||||
{
|
||||
"FlipperChangelogStatus": "{"lastHeader":"# Version 3.0"}",
|
||||
}
|
||||
`);
|
||||
expect(hasNewChangesToShow(storage, newChangelog)).toBe(false);
|
||||
|
||||
@@ -4,7 +4,7 @@ exports[`ShareSheetPendingDialog is rendered with status update 1`] = `
|
||||
<div
|
||||
className="css-gzchr8-Container e1k65efv0"
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"textAlign": "center",
|
||||
"width": undefined,
|
||||
}
|
||||
@@ -18,7 +18,7 @@ exports[`ShareSheetPendingDialog is rendered with status update 1`] = `
|
||||
className="anticon anticon-loading anticon-spin ant-spin-dot"
|
||||
role="img"
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"fontSize": 30,
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ exports[`ShareSheetPendingDialog is rendered with status update 1`] = `
|
||||
className="ant-typography"
|
||||
onClick={null}
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"WebkitLineClamp": undefined,
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ exports[`ShareSheetPendingDialog is rendered without status update 1`] = `
|
||||
<div
|
||||
className="css-gzchr8-Container e1k65efv0"
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"textAlign": "center",
|
||||
"width": undefined,
|
||||
}
|
||||
@@ -86,7 +86,7 @@ exports[`ShareSheetPendingDialog is rendered without status update 1`] = `
|
||||
className="anticon anticon-loading anticon-spin ant-spin-dot"
|
||||
role="img"
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"fontSize": 30,
|
||||
}
|
||||
}
|
||||
@@ -110,7 +110,7 @@ exports[`ShareSheetPendingDialog is rendered without status update 1`] = `
|
||||
className="ant-typography"
|
||||
onClick={null}
|
||||
style={
|
||||
Object {
|
||||
{
|
||||
"WebkitLineClamp": undefined,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,17 +58,17 @@ test('It can store rows', () => {
|
||||
|
||||
expect(getFlipperDebugMessages().map(fixRowTimestamps))
|
||||
.toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Object {
|
||||
[
|
||||
{
|
||||
"app": "Flipper",
|
||||
"direction": "toFlipper:message",
|
||||
"time": 1899-12-31T00:00:00.000Z,
|
||||
},
|
||||
Object {
|
||||
{
|
||||
"app": "FB4A",
|
||||
"device": "Android Phone",
|
||||
"direction": "toClient:call",
|
||||
"payload": Object {
|
||||
"payload": {
|
||||
"hello": "world",
|
||||
},
|
||||
"time": 1899-12-31T00:00:00.000Z,
|
||||
|
||||
Reference in New Issue
Block a user