updates tests
This commit is contained in:
1 parent
36c12fa66d
commit
96377df101
42 files changed
+246
-203
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user