mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-26 14:21:01 +00:00
Finish test for .recent
This commit is contained in:
parent
953dbded23
commit
1c0f001e4a
1 changed files with 14 additions and 12 deletions
|
@ -97,17 +97,19 @@ describe("ArchivedGather", () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// it ("returns 5 most recent gathers", done => {
|
it ("returns 5 most recent gathers", done => {
|
||||||
// let lastFive = gathers.slice(Math.max(gathers.length - 5, 1));
|
let lastFive = gathers.slice(Math.max(gathers.length - 5, 1));
|
||||||
// ArchivedGather.recent((error, results) => {
|
ArchivedGather.recent((error, results) => {
|
||||||
// if (error) return done(error);
|
if (error) return done(error);
|
||||||
// assert.equal(results.length, 5);
|
assert.equal(results.length, 5);
|
||||||
// lastFive.forEach(recent => {
|
lastFive.forEach(recent => {
|
||||||
// assert.isTrue(results.some(result => {
|
assert.isTrue(results.some(result => {
|
||||||
// return result.gather.done.time === recent.done.time;
|
return result.gather.done.time.getTime()
|
||||||
// }));
|
=== recent.gather.done.time.getTime();
|
||||||
// });
|
}));
|
||||||
// });
|
});
|
||||||
// });
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
Loading…
Reference in a new issue