Download wp-calypso/client/my-sites/customize/test/panels.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 629 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/customize/test/panels.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/my-sites/customize/test/panels.js
-
curl -L -o panels.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/my-sites/customize/test/panels.js
629 Bytes
| 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' } ); | |
| } ); | |
| } ); | |
| } ); | |