mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 14:51:29 +00:00
simplify sorting
This commit is contained in:
parent
0e451991f4
commit
2c221dc53f
@ -494,13 +494,12 @@ describe('Uploads folder', () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
populate: '*',
|
populate: '*',
|
||||||
|
// sort the same as fileInfo so that the loop below matches regardless of order
|
||||||
|
sort: ['name:desc'],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// sort the same as fileInfo so that the loop below matches regardless of order
|
files.forEach((file, index) =>
|
||||||
const sortedResults = orderBy('name', 'asc')(files);
|
|
||||||
|
|
||||||
sortedResults.forEach((file, index) =>
|
|
||||||
expect(file).toMatchObject({
|
expect(file).toMatchObject({
|
||||||
...fileInfo[index],
|
...fileInfo[index],
|
||||||
folder: {
|
folder: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user