Skip to content

Commit

Permalink
Framework: Fix failing tests caused by Babel 7 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Jul 9, 2018
1 parent 859d706 commit 91dcc4f
Show file tree
Hide file tree
Showing 8 changed files with 4,567 additions and 4,466 deletions.
4 changes: 2 additions & 2 deletions editor/components/block-edit/test/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe( 'Edit', () => {

const wrapper = shallow( <Edit name="core/test-block" /> );

expect( wrapper.find( edit ) ).toBePresent();
expect( wrapper.find( edit ) ).toExist();
} );

it( 'should use save implementation of block as fallback', () => {
Expand All @@ -55,7 +55,7 @@ describe( 'Edit', () => {

const wrapper = shallow( <Edit name="core/test-block" /> );

expect( wrapper.find( save ) ).toBePresent();
expect( wrapper.find( save ) ).toExist();
} );

it( 'should combine the default class name with a custom one', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,23 @@ exports[`DefaultBlockAppender should append a default block when input focused 1
"calls": Array [
Array [],
],
"results": undefined,
}
}
onFocus={
[MockFunction] {
"calls": Array [
Array [],
],
"results": undefined,
}
}
onKeyDown={
[MockFunction] {
"calls": Array [
Array [],
],
"results": undefined,
}
}
readOnly={true}
Expand Down
8 changes: 4 additions & 4 deletions editor/components/inserter/test/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe( 'InserterMenu', () => {
expect( visibleBlocks.at( 1 ).text() ).toBe( 'A Text Embed' );

const noResultsMessage = wrapper.find( '.editor-inserter__no-results' );
expect( noResultsMessage ).toBeEmpty();
expect( noResultsMessage ).not.toExist();
} );

it( 'should show shared items in the shared tab', () => {
Expand Down Expand Up @@ -222,7 +222,7 @@ describe( 'InserterMenu', () => {
expect( visibleBlocks.at( 0 ).text() ).toBe( 'My shared block' );

const noResultsMessage = wrapper.find( '.editor-inserter__no-results' );
expect( noResultsMessage ).toBeEmpty();
expect( noResultsMessage ).not.toExist();
} );

it( 'should show the common category blocks', () => {
Expand Down Expand Up @@ -253,7 +253,7 @@ describe( 'InserterMenu', () => {
expect( visibleBlocks.at( 2 ).text() ).toBe( 'Some Other Block' );

const noResultsMessage = wrapper.find( '.editor-inserter__no-results' );
expect( noResultsMessage ).toBeEmpty();
expect( noResultsMessage ).not.toExist();
} );

it( 'should disable items with `isDisabled`', () => {
Expand Down Expand Up @@ -308,7 +308,7 @@ describe( 'InserterMenu', () => {
expect( visibleBlocks.at( 2 ).text() ).toBe( 'A Text Embed' );

const noResultsMessage = wrapper.find( '.editor-inserter__no-results' );
expect( noResultsMessage ).toBeEmpty();
expect( noResultsMessage ).not.toExist();
} );

it( 'should trim whitespace of search terms', () => {
Expand Down
Loading

0 comments on commit 91dcc4f

Please sign in to comment.