mirror of
https://github.com/strapi/strapi.git
synced 2025-09-15 03:27:19 +00:00
fix unit test to work with mapAsyncDialect
This commit is contained in:
parent
708e1d677c
commit
76563f68fd
@ -366,7 +366,16 @@ describe('Entity service', () => {
|
|||||||
|
|
||||||
const fakeStrapi = {
|
const fakeStrapi = {
|
||||||
getModel: jest.fn((modelName) => fakeModels[modelName]),
|
getModel: jest.fn((modelName) => fakeModels[modelName]),
|
||||||
|
query: jest.fn(() => fakeQuery),
|
||||||
|
db: {
|
||||||
|
dialect: {
|
||||||
|
client: 'sqlite',
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
global.strapi = fakeStrapi;
|
||||||
|
|
||||||
instance = createEntityService({
|
instance = createEntityService({
|
||||||
strapi: fakeStrapi,
|
strapi: fakeStrapi,
|
||||||
db: fakeDB,
|
db: fakeDB,
|
||||||
|
@ -65,6 +65,11 @@ const setGlobalStrapi = () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
db: {
|
||||||
|
dialect: {
|
||||||
|
client: 'sqlite',
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user