1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/mongo_test.ts b/src/test/mongo_test.ts
index ad290198..d6906402 100644
--- a/src/test/mongo_test.ts
+++ b/src/test/mongo_test.ts
@@ -1,4 +1,6 @@
import mongoose from "mongoose";
+import { Long } from "mongodb";
+import { Snowflake } from "../util/Snowflake";
async function main() {
const conn = await mongoose.createConnection(
@@ -9,10 +11,7 @@ async function main() {
}
);
console.log("connected");
- const result = await conn
- .collection("users")
- .find({ $or: [{ email: "samuel.scheit@gmail.com" }, { phone: "samuel.scheit@gmail.com" }] })
- .toArray();
+ const result = await conn.collection("users").insertOne({ test: Long.fromString(Snowflake.generate().toString()) });
// .project(undefined)
console.log(result);
|