Download react-boilerplate/app/containers/LanguageProvider/tests/reducer.test.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 537 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-boilerplate/app/containers/LanguageProvider/tests/reducer.test.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/react-boilerplate/app/containers/LanguageProvider/tests/reducer.test.js
-
curl -L -o reducer.test.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/react-boilerplate/app/containers/LanguageProvider/tests/reducer.test.js
537 Bytes
| import languageProviderReducer from '../reducer'; | |
| import { CHANGE_LOCALE } from '../constants'; | |
| /* eslint-disable default-case, no-param-reassign */ | |
| describe('languageProviderReducer', () => { | |
| it('returns the initial state', () => { | |
| expect(languageProviderReducer(undefined, {})).toEqual({ | |
| locale: 'en', | |
| }); | |
| }); | |
| it('changes the locale', () => { | |
| expect( | |
| languageProviderReducer(undefined, { | |
| type: CHANGE_LOCALE, | |
| locale: 'de', | |
| }), | |
| ).toEqual({ | |
| locale: 'de', | |
| }); | |
| }); | |
| }); | |