File tree 2 files changed +17
-4
lines changed
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 1
- import { render , screen } from "@testing-library/react" ;
1
+ import { render } from "@testing-library/react" ;
2
2
import { describe , expect , it } from "vitest" ;
3
3
import { App } from "~/App" ;
4
4
5
5
describe ( "App" , ( ) => {
6
- it ( "it should be render" , ( ) => {
7
- render ( < App /> ) ;
8
- expect ( screen . getByText ( "Imprint" ) ) . toBeInTheDocument ( ) ;
6
+ it ( "should render skeleton " , ( ) => {
7
+ const { getByText } = render ( < App /> ) ;
8
+ expect ( getByText ( "Imprint" ) ) . toBeInTheDocument ( ) ;
9
9
} ) ;
10
10
} ) ;
Original file line number Diff line number Diff line change
1
+ import { render , waitFor } from "@testing-library/react" ;
2
+ import { describe , expect , it } from "vitest" ;
3
+ import { App } from "~/App" ;
4
+
5
+ describe ( "Home" , ( ) => {
6
+ it ( "should render Home with data" , async ( ) => {
7
+ const { getByText } = render ( < App /> ) ;
8
+
9
+ await waitFor ( ( ) => {
10
+ expect ( getByText ( "Application Services" ) ) . toBeInTheDocument ( ) ;
11
+ } , { timeout : 6000 } ) ;
12
+ } , 6000 ) ;
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments