Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Nov 23, 2020
1 parent c4c0040 commit f12afaa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/edit-widgets/src/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const editorSettings = {
};

describe( 'edit-widgets', () => {
it( 'renders', async () => {
// eslint-disable-next-line jest/no-focused-tests
it.only( 'renders', async () => {
render( register( editorSettings ) );

const widgetAreas = await screen.findAllByRole( 'group', {
Expand Down
6 changes: 5 additions & 1 deletion packages/edit-widgets/src/test/mocks/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export const server = setupServer( ...handlers );

if ( typeof jest === 'object' ) {
// Auto run the server when in Jest environment.
beforeAll( () => server.listen() );
beforeAll( () =>
server.listen( {
onUnhandledRequest: 'error',
} )
);
afterEach( () => server.resetHandlers() );
afterAll( () => server.close() );
}

0 comments on commit f12afaa

Please sign in to comment.