mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
fix tests
This commit is contained in:
parent
b0091aa4a8
commit
6a1100b4f9
@ -589,7 +589,7 @@ const createEntityManager = (db) => {
|
||||
.connect(relsToAdd)
|
||||
.get()
|
||||
// set the order based on the order of the ids
|
||||
.reduce((acc, rel, idx) => Object.assign(acc, { [rel.id]: idx }), {});
|
||||
.reduce((acc, rel, idx) => ({ ...acc, [rel.id]: idx }), {});
|
||||
|
||||
insert.forEach((row) => {
|
||||
row[orderColumnName] = orderMap[row[inverseJoinColumn.name]];
|
||||
|
||||
@ -817,11 +817,11 @@ describe('Relations', () => {
|
||||
],
|
||||
});
|
||||
|
||||
// const expectedShop = shopFactory({
|
||||
// anyToManyRel: [{ id: id2 }, { id: id1 }, { id: id3 }],
|
||||
// });
|
||||
const expectedShop = shopFactory({
|
||||
anyToManyRel: [{ id: id2 }, { id: id1 }, { id: id3 }],
|
||||
});
|
||||
|
||||
expect(updatedShop).toMatchObject({ a: 'test' });
|
||||
expect(updatedShop).toMatchObject(expectedShop);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user