diff --git a/plugins/mongoose-audit/test/index.test.js b/plugins/mongoose-audit/test/index.test.js index ec0308f..c50169b 100644 --- a/plugins/mongoose-audit/test/index.test.js +++ b/plugins/mongoose-audit/test/index.test.js @@ -2,7 +2,13 @@ import { default as mongoose } from "mongoose"; import { plugin, Audit } from "../src"; import { AuditType } from "../src/constants"; +jest.setTimeout(120000) + +const execute = promisify(exec) + const connectToDatabase = async () => { + await execute("docker run -d -p 27017:27017 mongo:5.0") + await new Promise((resolve) => setTimeout(resolve, 3000)) await mongoose.connect("mongodb://localhost:27017/test") };