mirror of
https://github.com/strapi/strapi.git
synced 2025-08-09 17:26:11 +00:00
fix unit tests
This commit is contained in:
parent
ecfbe42ae2
commit
06b87fca54
@ -46,10 +46,13 @@ describe('Local Strapi Source Provider - Entities Streaming', () => {
|
|||||||
{ id: 2, age: 84 },
|
{ id: 2, age: 84 },
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
const contentTypes = getContentTypes();
|
||||||
const strapi = getStrapiFactory({
|
const strapi = getStrapiFactory({
|
||||||
contentTypes: getContentTypes(),
|
contentTypes,
|
||||||
db: { queryBuilder },
|
db: { queryBuilder },
|
||||||
|
getModel: jest.fn((uid) => {
|
||||||
|
return contentTypes[uid];
|
||||||
|
}),
|
||||||
})();
|
})();
|
||||||
|
|
||||||
const entitiesStream = createEntitiesStream(strapi);
|
const entitiesStream = createEntitiesStream(strapi);
|
||||||
|
@ -95,6 +95,9 @@ describe('Local Strapi Source Provider', () => {
|
|||||||
db: {
|
db: {
|
||||||
queryBuilder,
|
queryBuilder,
|
||||||
},
|
},
|
||||||
|
getModel: jest.fn((uid) => {
|
||||||
|
return contentTypes[uid];
|
||||||
|
}),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user