Test suite failed to run in jest with error : no message provided

Viewed 438

while running jest test on my react i am getting this error for some components and other components are working fine.

import { App } from "../App";
import React from "react";
import { render } from '@testing-library/react';
import { act } from 'react-dom/test-utils';

describe('Render the app component', () => {

    test('Render without crash',async() => {
      await act(async () => {
      render(<App/>);
    });

    test('it should run',()=>{
      expect(2).toBe(2);
    })
});
});

whole test suite is failing failing for this test. error message:

Test suite failed to run

Error: No message was provided

import { App } from "../App";
import React from "react";
import { render } from '@testing-library/react';
import { act } from 'react-dom/test-utils';

describe('Render the app component', () => {
  
  test('it should run',()=>{
    expect(2).toBe(2);
  })


});

tests are passing for this.

0 Answers
Related