Skip to content

Commit

Permalink
Remove tests for actions/selectors that now call through to the inter…
Browse files Browse the repository at this point in the history
…face store
  • Loading branch information
talldan committed Aug 20, 2021
1 parent 256de69 commit fb569b6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.
11 changes: 0 additions & 11 deletions packages/edit-post/src/store/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
togglePublishSidebar,
openModal,
closeModal,
toggleFeature,
requestMetaBoxUpdates,
setIsListViewOpened,
} from '../actions';
Expand Down Expand Up @@ -90,16 +89,6 @@ describe( 'actions', () => {
} );
} );

describe( 'toggleFeature', () => {
it( 'should return TOGGLE_FEATURE action', () => {
const feature = 'name';
expect( toggleFeature( feature ) ).toEqual( {
type: 'TOGGLE_FEATURE',
feature,
} );
} );
} );

describe( 'requestMetaBoxUpdates', () => {
it( 'should yield the REQUEST_META_BOX_UPDATES action', () => {
const fulfillment = requestMetaBoxUpdates();
Expand Down
46 changes: 0 additions & 46 deletions packages/edit-post/src/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
getPreference,
isEditorPanelOpened,
isModalActive,
isFeatureActive,
hasMetaBoxes,
isSavingMetaBoxes,
getActiveMetaBoxLocations,
Expand Down Expand Up @@ -239,51 +238,6 @@ describe( 'selectors', () => {
} );
} );

describe( 'isFeatureActive', () => {
it( 'is tolerant to an undefined features preference', () => {
// See: https://github.com/WordPress/gutenberg/issues/14580
const state = {
preferences: {},
};

expect( isFeatureActive( state, 'chicken' ) ).toBe( false );
} );

it( 'should return true if feature is active', () => {
const state = {
preferences: {
features: {
chicken: true,
},
},
};

expect( isFeatureActive( state, 'chicken' ) ).toBe( true );
} );

it( 'should return false if feature is not active', () => {
const state = {
preferences: {
features: {
chicken: false,
},
},
};

expect( isFeatureActive( state, 'chicken' ) ).toBe( false );
} );

it( 'should return false if feature is not referred', () => {
const state = {
preferences: {
features: {},
},
};

expect( isFeatureActive( state, 'chicken' ) ).toBe( false );
} );
} );

describe( 'hasMetaBoxes', () => {
it( 'should return true if there are active meta boxes', () => {
const state = {
Expand Down

0 comments on commit fb569b6

Please sign in to comment.