File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -83,31 +83,27 @@ describe("App - Initial State Setup", () => {
8383 cleanup ( ) ;
8484 } ) ;
8585
86- it ( "should show the loading modal while the wasm module is loading" , async ( ) => {
86+ it ( "should show the loading modal while the wasm module is loading, and not show it once it has been loaded " , async ( ) => {
8787 render ( < TestApp /> ) ;
8888
8989 await waitFor ( ( ) => {
9090 expect ( screen . getByText ( "Loading assets" ) ) ;
9191 } ) ;
92- } ) ;
93-
94- it ( "should call initWasm" , async ( ) => {
95- render ( < TestApp /> ) ;
9692
97- await waitFor ( ( ) => {
93+ await waitFor ( async ( ) => {
9894 expect ( initWasm ) . toHaveBeenCalled ( ) ;
9995 } ) ;
96+
97+ expect ( screen . queryByTestId ( "wasm-loading-modal" ) ) . toBeNull ( ) ;
98+ expect ( screen . queryByTestId ( "wasm-error-modal" ) ) . toBeNull ( ) ;
10099 } ) ;
101100
102- it ( "should not show the loading modal after the wasm has been loaded " , async ( ) => {
101+ it ( "should call initWasm " , async ( ) => {
103102 render ( < TestApp /> ) ;
104103
105- await waitFor ( async ( ) => {
104+ await waitFor ( ( ) => {
106105 expect ( initWasm ) . toHaveBeenCalled ( ) ;
107106 } ) ;
108-
109- expect ( screen . queryByTestId ( "wasm-loading-modal" ) ) . toBeNull ( ) ;
110- expect ( screen . queryByTestId ( "wasm-error-modal" ) ) . toBeNull ( ) ;
111107 } ) ;
112108
113109 it ( "should use the default example if `window.CODE` is not defined" , async ( ) => {
You can’t perform that action at this time.
0 commit comments