fix unit test to work with mapAsyncDialect

This commit is contained in:
Marc-Roig 2023-02-02 15:00:35 +01:00
parent 708e1d677c
commit 76563f68fd
2 changed files with 14 additions and 0 deletions

View File

@ -366,7 +366,16 @@ describe('Entity service', () => {
const fakeStrapi = {
getModel: jest.fn((modelName) => fakeModels[modelName]),
query: jest.fn(() => fakeQuery),
db: {
dialect: {
client: 'sqlite',
},
},
};
global.strapi = fakeStrapi;
instance = createEntityService({
strapi: fakeStrapi,
db: fakeDB,

View File

@ -65,6 +65,11 @@ const setGlobalStrapi = () => {
},
},
},
db: {
dialect: {
client: 'sqlite',
},
},
};
};