Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Dec 9, 2024
1 parent 79f9c95 commit 8154c46
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/data/src/components/use-select/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,24 @@ function counterStore( initialCount = 0, step = 1 ) {
};
}

// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable @wordpress/wp-global-usage */
describe( 'useSelect', () => {
const initialScriptDebug = globalThis.SCRIPT_DEBUG;
let registry;

beforeAll( () => {
globalThis.SCRIPT_DEBUG = false;
} );

beforeEach( () => {
registry = createRegistry();
} );

afterAll( () => {
globalThis.SCRIPT_DEBUG = initialScriptDebug;
} );

it( 'passes the relevant data to the component', () => {
registry.registerStore( 'testStore', {
reducer: () => ( { foo: 'bar' } ),
Expand Down

0 comments on commit 8154c46

Please sign in to comment.