fix: Delete _id off of expected results

This commit is contained in:
zkldi
2022-04-22 18:48:52 +01:00
parent 4f31d7be3b
commit 60669e6d12
+9 -5
View File
@@ -55,11 +55,15 @@ t.test("#GetUsersWithIDs", (t) => {
t.test("Should return users with these IDs.", async (t) => {
const res = await GetUsersWithIDs([2, 3]);
t.strictSame(
res,
[mkFakeUser(2), mkFakeUser(3)],
"Should return the user documents at these IDs."
);
const expected = [mkFakeUser(2), mkFakeUser(3)];
for (const e of expected) {
// workaround for monk mutating our state. I know this is bad.
// I'll fix it at some point.
delete e._id;
}
t.strictSame(res, expected, "Should return the user documents at these IDs.");
t.end();
});