File size: 629 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import { getCustomizerFocus } from '../panels';
describe( 'panels', () => {
describe( 'getCustomizerFocus()', () => {
test( 'should return null if passed a falsey value', () => {
const arg = getCustomizerFocus();
expect( arg ).toBeNull();
} );
test( 'should return null if panel is not recognized', () => {
const arg = getCustomizerFocus( '__UNKNOWN' );
expect( arg ).toBeNull();
} );
test( 'should return object of recognized wordpress focus argument', () => {
const arg = getCustomizerFocus( 'identity' );
expect( arg ).toEqual( { 'autofocus[section]': 'title_tagline' } );
} );
} );
} );
|