summary refs log tree commit diff
path: root/src/test/mongo_test.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-02 00:51:00 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-02 00:51:00 +0100
commit8505d9279b0855990619008b38094d17a0be2aeb (patch)
tree9ddd83d513297b005e2546b999a68e6a2f0a0a78 /src/test/mongo_test.ts
parent:sparkles: [Route] Register (diff)
downloadserver-8505d9279b0855990619008b38094d17a0be2aeb.tar.xz
:art: Body Parser error
Diffstat (limited to 'src/test/mongo_test.ts')
-rw-r--r--src/test/mongo_test.ts7
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);