diff --git a/app/components/atoms/LanguageProvider/tests/action.test.js b/app/components/atoms/LanguageProvider/tests/action.test.js new file mode 100644 index 0000000..a0bd652 --- /dev/null +++ b/app/components/atoms/LanguageProvider/tests/action.test.js @@ -0,0 +1,15 @@ +import { changeLocale } from '../actions'; +import { CHANGE_LOCALE } from '../constants'; + +// Test suite for the changeLocale action creator +describe('changeLocale action creator', () => { + it('should create an action to change the locale', () => { + const languageLocale = 'en'; + const expectedAction = { + type: CHANGE_LOCALE, + locale: languageLocale + }; + const action = changeLocale(languageLocale); + expect(action).toEqual(expectedAction); + }); +});