Skip to content

Commit a04c5e9

Browse files
committed
tests: moved registerCoreBlock() to beforeAll()
1 parent e556378 commit a04c5e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/store/actions/test.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ import { registerCoreBlocks } from '@gutenberg/core-blocks';
88

99
describe( 'Store', () => {
1010
describe( 'actions', () => {
11+
beforeAll( () => {
12+
registerCoreBlocks();
13+
} );
14+
1115
it( 'should create an action to focus a block', () => {
1216
const action = actions.focusBlockAction( '1' );
1317
expect( action.type ).toBeDefined();
@@ -37,7 +41,6 @@ describe( 'Store', () => {
3741
} );
3842

3943
it( 'should create an action to create a block', () => {
40-
registerCoreBlocks();
4144
const newBlock = createBlock( 'core/code', { content: 'new test text for a core/code block' } );
4245
const action = actions.createBlockAction( '1', newBlock );
4346
expect( action.type ).toEqual( ActionTypes.BLOCK.CREATE );

0 commit comments

Comments
 (0)