Skip to content

Commit

Permalink
Update sanitizer mocking in i18n test
Browse files Browse the repository at this point in the history
  • Loading branch information
iicdii committed May 7, 2022
1 parent 5959788 commit e918293
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions packages/plugins/i18n/server/controllers/__tests__/locales.test.js
Expand Up @@ -4,11 +4,9 @@ const { ApplicationError } = require('@strapi/utils').errors;
const { listLocales, createLocale, updateLocale, deleteLocale } = require('../locales');
const localeModel = require('../../content-types/locale');

const container = {
const sanitizers = {
get() {
return {
get() {},
};
return [];
},
};

Expand All @@ -32,7 +30,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = {};
Expand Down Expand Up @@ -70,7 +68,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = { request: { body: { ...locale, isDefault: true } }, state: { user: { id: 1 } } };
Expand Down Expand Up @@ -106,7 +104,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = {
Expand Down Expand Up @@ -144,7 +142,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = {
Expand Down Expand Up @@ -192,7 +190,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = {
Expand Down Expand Up @@ -234,7 +232,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = {
Expand Down Expand Up @@ -283,7 +281,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = { params: { id: 1 } };
Expand Down Expand Up @@ -317,7 +315,7 @@ describe('Locales', () => {
},
},
},
container,
sanitizers,
};

const ctx = { params: { id: 1 } };
Expand Down

0 comments on commit e918293

Please sign in to comment.