Teardown the mock

This commit is contained in:
Mark Kaylor 2023-04-21 17:20:01 +02:00
parent 924aca18f1
commit 29cd84c237

View File

@ -2,7 +2,7 @@
const override = require('../override'); const override = require('../override');
const strapi = { const strapiMock = {
config: { config: {
get: () => ({ get: () => ({
'x-strapi-config': { 'x-strapi-config': {
@ -12,7 +12,12 @@ const strapi = {
}, },
}; };
let strapi = strapiMock;
describe('Documentation plugin | Override service', () => { describe('Documentation plugin | Override service', () => {
afterEach(() => {
// Reset strapi after each test
strapi = strapiMock;
});
it('should register an override', () => { it('should register an override', () => {
const mockOverride = { const mockOverride = {
openapi: '3.0.0', openapi: '3.0.0',