diff --git a/packages/strapi-plugin-i18n/constants/__tests__/index.test.js b/packages/strapi-plugin-i18n/constants/__tests__/index.test.js index 0abdf2e372..8112154766 100644 --- a/packages/strapi-plugin-i18n/constants/__tests__/index.test.js +++ b/packages/strapi-plugin-i18n/constants/__tests__/index.test.js @@ -5,7 +5,7 @@ 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)', }); @@ -13,8 +13,9 @@ describe('I18N default locale', () => { 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)', }); }); diff --git a/packages/strapi-plugin-i18n/constants/index.js b/packages/strapi-plugin-i18n/constants/index.js index d9455c543c..9eb537d692 100644 --- a/packages/strapi-plugin-i18n/constants/index.js +++ b/packages/strapi-plugin-i18n/constants/index.js @@ -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' ); }