Skip to content

Commit

Permalink
test(mongo): update and disable tests
Browse files Browse the repository at this point in the history
 due to macos download issue
  • Loading branch information
pi0 committed Nov 14, 2023
1 parent 9e975d9 commit 44ffe1d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions test/drivers/mongodb.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import { afterAll, describe, expect, it } from "vitest";
import { afterAll, beforeAll, describe, expect, it } from "vitest";
import driver from "../../src/drivers/mongodb";
import { testDriver } from "./utils";
import { MongoMemoryServer } from "mongodb-memory-server";
import { promisify } from "util";

const sleep = promisify(setTimeout);
const mongoServer = await MongoMemoryServer.create();
describe.skip("drivers: mongodb", async () => {
const sleep = promisify(setTimeout);

describe("drivers: mongodb", () => {
const connectionString = mongoServer.getUri();
let mongoServer: MongoMemoryServer;
let connectionString: string | undefined;

beforeAll(async () => {
mongoServer = await MongoMemoryServer.create();
connectionString = mongoServer.getUri();
});

afterAll(async () => {
if (mongoServer) {
Expand All @@ -18,7 +23,7 @@ describe("drivers: mongodb", () => {

testDriver({
driver: driver({
connectionString,
connectionString: connectionString as string,
databaseName: "test",
collectionName: "test",
}),
Expand Down

0 comments on commit 44ffe1d

Please sign in to comment.