Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Apr 20, 2021
1 parent e939a2a commit 7669b52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/strapi-plugin-i18n/constants/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ const { getInitLocale } = require('../');
describe('I18N default locale', () => {
describe('getInitLocale', () => {
test('The init locale is english by default', () => {
expect(getInitLocale()).toEqual({
expect(getInitLocale()).toStrictEqual({
code: 'en',
name: 'English (en)',
});
});

test('The init locale can be configured by an env var', () => {
process.env.STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE = 'fr';
expect(getInitLocale()).toMatchObject({
expect(getInitLocale()).toStrictEqual({
code: 'fr',
name: 'French (fr)',
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/strapi-plugin-i18n/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const getInitLocale = () => {

if (!matchingLocale) {
throw new Error(
'Unknown locale code provided in the envrionment variable STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE'
'Unknown locale code provided in the environment variable STRAPI_PLUGIN_I18N_INIT_LOCALE_CODE'
);
}

Expand Down

0 comments on commit 7669b52

Please sign in to comment.