Skip to content

Commit

Permalink
test: use skipIf
Browse files Browse the repository at this point in the history
  • Loading branch information
Hebilicious committed Aug 17, 2023
1 parent 34e668b commit ba6ea2d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/drivers/redis-upstash.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, it } from "vitest";
import { describe } from "vitest";
import { testDriver } from "./utils";
import driver from "../../src/drivers/redis-upstash";

Expand All @@ -8,10 +8,8 @@ import "dotenv/config";
const hasEnv =
process.env.UPSTASH_REDIS_REST_URL && process.env.UPSTASH_REDIS_REST_TOKEN;

describe("drivers: redis-upstash", async () => {
if (hasEnv) {
testDriver({
driver: driver({}),
});
}
describe.skipIf(!hasEnv)("drivers: redis-upstash", async () => {
testDriver({
driver: driver({}),
});
});

0 comments on commit ba6ea2d

Please sign in to comment.