-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Widgets Editor: add show block bread crumbs feature toggle to more me…
…nu (#32569)
- Loading branch information
1 parent
d7754fc
commit 5c8ef44
Showing
4 changed files
with
52 additions
and
1 deletion.
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,29 @@ | ||
/** | ||
* 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 ); | ||
} ); | ||
} ); | ||
} ); |