diff --git a/jest.config.js b/jest.config.js index 365524e0ef..1c7154fb24 100644 --- a/jest.config.js +++ b/jest.config.js @@ -26,6 +26,7 @@ module.exports = { clearMocks: true, preset: './gutenberg/node_modules/react-native/jest-preset.js', setupFiles: [ '/' + configPath + '/setup.js' ], + setupFilesAfterEnv: [ '/' + configPath + '/setup-after-env.js' ], testMatch: [ '/src/**/test/*.[jt]s?(x)' ], testPathIgnorePatterns: [ '/node_modules/', diff --git a/src/test/index.js b/src/test/index.js index e5a9a71f10..d11eee2a61 100644 --- a/src/test/index.js +++ b/src/test/index.js @@ -88,8 +88,6 @@ describe( 'Gutenberg Mobile initialization', () => { } ); } ); - describe( 'editor rendering', () => {} ); - it( 'renders the editor', async () => { // Unmock setup module to render the actual editor component. jest.unmock( '@wordpress/react-native-editor/src/setup' ); @@ -110,7 +108,7 @@ describe( 'Gutenberg Mobile initialization', () => { ); const blockList = screen.getByTestId( 'block-list-wrapper' ); - expect( blockList ).toBeDefined(); + expect( blockList ).toBeVisible(); expect( console ).toHaveLoggedWith( 'Hermes is: true' ); setupLocaleLogs.forEach( ( log ) => expect( console ).toHaveLoggedWith( ...log )