forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added `showBlockBreadcrumbs` feature to the more menu in the Widgets Editor. Importing it into the Widgets interface, but waiting on WordPress#32498 to merge before final integration.
- Loading branch information
Showing
4 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
|
||
import { __unstableIsFeatureActive } from '../selectors'; | ||
|
||
describe( 'selectors', () => { | ||
describe( '__unstableIsFeatureActive', () => { | ||
it( 'should return the feature value when present', () => { | ||
const state = { | ||
preferences: { | ||
features: { isNightVisionActivated: true }, | ||
}, | ||
}; | ||
expect( | ||
__unstableIsFeatureActive( state, 'isNightVisionActivated' ) | ||
).toBe( true ); | ||
} ); | ||
|
||
it( 'should return false where feature is not found', () => { | ||
const state = { | ||
preferences: {}, | ||
}; | ||
expect( | ||
__unstableIsFeatureActive( state, 'didILeaveTheOvenOn' ) | ||
).toBe( false ); | ||
} ); | ||
|
||
it( 'should return false where the state is empty', () => { | ||
const state = {}; | ||
expect( | ||
__unstableIsFeatureActive( state, 'didILeaveTheOvenOn' ) | ||
).toBe( false ); | ||
} ); | ||
} ); | ||
} ); |