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
co-authored by Ashley Harrison
parent 8e6d343981
commit e84a01e870
91 changed files with 11654 additions and 11597 deletions
@@ -40,14 +40,14 @@ describe('Array DataFrame', () => {
test('Should convert an array of objects to a dataframe', () => {
expect(toDataFrameDTO(frame)).toMatchInlineSnapshot(`
Object {
"fields": Array [
Object {
"config": Object {},
{
"fields": [
{
"config": {},
"labels": undefined,
"name": "name",
"type": "string",
"values": Array [
"values": [
"first",
"second",
"third",
@@ -55,14 +55,14 @@ describe('Array DataFrame', () => {
"5th (Null)",
],
},
Object {
"config": Object {
{
"config": {
"unit": "kwh",
},
"labels": undefined,
"name": "value",
"type": "number",
"values": Array [
"values": [
1,
2,
3,
@@ -70,12 +70,12 @@ describe('Array DataFrame', () => {
null,
],
},
Object {
"config": Object {},
{
"config": {},
"labels": undefined,
"name": "time",
"type": "time",
"values": Array [
"values": [
123,
456,
789,
@@ -83,12 +83,12 @@ describe('Array DataFrame', () => {
1100,
],
},
Object {
"config": Object {},
{
"config": {},
"labels": undefined,
"name": "phantom",
"type": "string",
"values": Array [
"values": [
"🦥",
"🦥",
"🦥",
@@ -29,50 +29,50 @@ describe('DataFrame JSON', () => {
const frame = dataFrameFromJSON(json);
expect(frame).toMatchInlineSnapshot(`
Object {
"fields": Array [
Object {
"config": Object {},
"entities": Object {},
{
"fields": [
{
"config": {},
"entities": {},
"name": "time",
"type": "time",
"values": Array [
"values": [
100,
200,
300,
],
},
Object {
"config": Object {},
"entities": Object {
"Inf": Array [
{
"config": {},
"entities": {
"Inf": [
1,
],
"NaN": Array [
"NaN": [
0,
],
"Undef": Array [
"Undef": [
2,
],
},
"name": "name",
"type": "string",
"values": Array [
"values": [
NaN,
Infinity,
undefined,
],
},
Object {
"config": Object {},
"entities": Object {
"NegInf": Array [
{
"config": {},
"entities": {
"NegInf": [
2,
],
},
"name": "value",
"type": "number",
"values": Array [
"values": [
1,
2,
-Infinity,
@@ -106,26 +106,26 @@ describe('DataFrame JSON', () => {
const frame = dataFrameFromJSON(json);
expect(frame).toMatchInlineSnapshot(`
Object {
"fields": Array [
Object {
"config": Object {},
"entities": Object {},
{
"fields": [
{
"config": {},
"entities": {},
"name": "time",
"type": "time",
"values": Array [
"values": [
100,
200,
300,
400,
],
},
Object {
"config": Object {},
"entities": Object {},
{
"config": {},
"entities": {},
"name": "value",
"type": "string",
"values": Array [
"values": [
"bar",
"foo",
"baz",
@@ -199,16 +199,16 @@ describe('toDataFrame', () => {
};
const dataFrame = toDataFrame(msg);
expect(dataFrame.fields.map((f) => ({ [f.name]: f.values.toArray() }))).toMatchInlineSnapshot(`
Array [
Object {
"First": Array [
[
{
"First": [
"2019-02-15",
"2019-03-15",
"2019-04-15",
],
},
Object {
"Second": Array [
{
"Second": [
3,
9,
16,