Update jest monorepo to v29 (#58261)

* Update jest monorepo to v29

* update snapshots + wrap test in act

* fix linting errors: jest.mocked now defaults to deep mocking

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
renovate[bot]
2022-11-24 14:00:41 +00:00
committed by GitHub
parent 8e6d343981
commit e84a01e870
91 changed files with 11654 additions and 11597 deletions

View File

@@ -20,37 +20,37 @@ describe('getPanelMenu', () => {
const menuItems = getPanelMenu(dashboard, panel);
expect(menuItems).toMatchInlineSnapshot(`
Array [
Object {
[
{
"iconClassName": "eye",
"onClick": [Function],
"shortcut": "v",
"text": "View",
},
Object {
{
"iconClassName": "edit",
"onClick": [Function],
"shortcut": "e",
"text": "Edit",
},
Object {
{
"iconClassName": "share-alt",
"onClick": [Function],
"shortcut": "p s",
"text": "Share",
},
Object {
{
"iconClassName": "compass",
"onClick": [Function],
"shortcut": "x",
"text": "Explore",
},
Object {
{
"iconClassName": "info-circle",
"onClick": [Function],
"shortcut": "i",
"subMenu": Array [
Object {
"subMenu": [
{
"onClick": [Function],
"text": "Panel JSON",
},
@@ -58,20 +58,20 @@ describe('getPanelMenu', () => {
"text": "Inspect",
"type": "submenu",
},
Object {
{
"iconClassName": "cube",
"onClick": [Function],
"subMenu": Array [
Object {
"subMenu": [
{
"onClick": [Function],
"shortcut": "p d",
"text": "Duplicate",
},
Object {
{
"onClick": [Function],
"text": "Copy",
},
Object {
{
"onClick": [Function],
"text": "Create library panel",
},
@@ -79,11 +79,11 @@ describe('getPanelMenu', () => {
"text": "More...",
"type": "submenu",
},
Object {
{
"text": "",
"type": "divider",
},
Object {
{
"iconClassName": "trash-alt",
"onClick": [Function],
"shortcut": "p r",
@@ -104,37 +104,37 @@ describe('getPanelMenu', () => {
const menuItems = getPanelMenu(dashboard, panel, angularComponent);
expect(menuItems).toMatchInlineSnapshot(`
Array [
Object {
[
{
"iconClassName": "eye",
"onClick": [Function],
"shortcut": "v",
"text": "View",
},
Object {
{
"iconClassName": "edit",
"onClick": [Function],
"shortcut": "e",
"text": "Edit",
},
Object {
{
"iconClassName": "share-alt",
"onClick": [Function],
"shortcut": "p s",
"text": "Share",
},
Object {
{
"iconClassName": "compass",
"onClick": [Function],
"shortcut": "x",
"text": "Explore",
},
Object {
{
"iconClassName": "info-circle",
"onClick": [Function],
"shortcut": "i",
"subMenu": Array [
Object {
"subMenu": [
{
"onClick": [Function],
"text": "Panel JSON",
},
@@ -142,11 +142,11 @@ describe('getPanelMenu', () => {
"text": "Inspect",
"type": "submenu",
},
Object {
{
"iconClassName": "cube",
"onClick": [Function],
"subMenu": Array [
Object {
"subMenu": [
{
"href": undefined,
"onClick": [Function],
"shortcut": "p l",

View File

@@ -49,16 +49,16 @@ describe('Merge dashbaord panels', () => {
const info = dashboard.updatePanels(rawPanels);
expect(info.changed).toBeFalsy();
expect(info.actions).toMatchInlineSnapshot(`
Object {
"add": Array [],
"noop": Array [
{
"add": [],
"noop": [
1,
2,
3,
],
"remove": Array [],
"replace": Array [],
"update": Array [],
"remove": [],
"replace": [],
"update": [],
}
`);
});
@@ -115,17 +115,17 @@ describe('Merge dashbaord panels', () => {
const info = dashboard.updatePanels(rawPanels);
expect(info.changed).toBeTruthy();
expect(info.actions).toMatchInlineSnapshot(`
Object {
"add": Array [],
"noop": Array [
{
"add": [],
"noop": [
1,
3,
],
"remove": Array [],
"replace": Array [
"remove": [],
"replace": [
2,
],
"update": Array [],
"update": [],
}
`);
});