updates tests

This commit is contained in:
Sebastian Rindom committed 2020-05-25 14:06:10 +02:00
1 parent 36c12fa66d
commit 96377df101
42 files changed
+246 -203

No files matched your search

+10 -4
View File
@@ -1,15 +1,21 @@
import mongoose from "mongoose"
String.prototype.equals = function(that) {
return this === that
}
class IdMap {
ids = {}
getId(key) {
getId(key, backend=false) {
if (this.ids[key]) {
return this.ids[key]
}
const id = `${mongoose.Types.ObjectId()}`
this.ids[key] = id
return id
const mongooseId = `${mongoose.Types.ObjectId()}`
this.ids[key] = mongooseId
return mongooseId
}
}