mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 10:23:34 +00:00
simplify sorting
This commit is contained in:
parent
0e451991f4
commit
2c221dc53f
@ -494,13 +494,12 @@ describe('Uploads folder', () => {
|
||||
},
|
||||
},
|
||||
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
|
||||
const sortedResults = orderBy('name', 'asc')(files);
|
||||
|
||||
sortedResults.forEach((file, index) =>
|
||||
files.forEach((file, index) =>
|
||||
expect(file).toMatchObject({
|
||||
...fileInfo[index],
|
||||
folder: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user