mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: move code
This commit is contained in:
@@ -269,18 +269,16 @@ describe('Sorted Set methods', function () {
|
||||
});
|
||||
|
||||
it('should work with big arrays (length > 100) ', async function () {
|
||||
const keys = [];
|
||||
for (let i = 0; i < 400; i++) {
|
||||
/* eslint-disable no-await-in-loop */
|
||||
const bulkAdd = [];
|
||||
keys.push('testzset' + i);
|
||||
for (let k = 0; k < 100; k++) {
|
||||
bulkAdd.push(['testzset' + i, 1000000 + k + (i * 100), k + (i * 100)]);
|
||||
}
|
||||
await db.sortedSetAddBulk(bulkAdd);
|
||||
}
|
||||
const keys = [];
|
||||
for (let i = 0; i < 400; i++) {
|
||||
keys.push('testzset' + i);
|
||||
}
|
||||
|
||||
let data = await db.getSortedSetRevRange(keys, 0, 3);
|
||||
assert.deepStrictEqual(data, ['39999', '39998', '39997', '39996']);
|
||||
|
||||
Reference in New Issue
Block a user