Download wp-calypso/client/state/ui/language/test/actions.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/language/test/actions.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/ui/language/test/actions.js
-
curl -L -o actions.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/language/test/actions.js
552 Bytes
| import { LOCALE_SET } from 'calypso/state/action-types'; | |
| import { setLocale } from '../actions'; | |
| describe( 'actions', () => { | |
| describe( 'setLocale', () => { | |
| test( 'returns an appropriate action', () => { | |
| expect( setLocale( 'he' ) ).toEqual( { | |
| type: LOCALE_SET, | |
| localeSlug: 'he', | |
| localeVariant: null, | |
| } ); | |
| } ); | |
| test( 'returns an action with localeVariant set', () => { | |
| expect( setLocale( 'he', 'he_formal' ) ).toEqual( { | |
| type: LOCALE_SET, | |
| localeSlug: 'he', | |
| localeVariant: 'he_formal', | |
| } ); | |
| } ); | |
| } ); | |
| } ); | |