Skip to content

Commit

Permalink
chore: make upstash tests dependent on env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Feb 27, 2022
1 parent d9bb3ce commit f1af3ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/adapter-upstash-redis/tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import { reviveFromJson, UpstashRedisAdapter } from "../src"
import "dotenv/config"

if (!process.env.UPSTASH_REDIS_URL || !process.env.UPSTASH_REDIS_KEY) {
console.log(
"Skipping UpstashRedisAdapter tests, since we are running without required environment variables."
)

expect(true).toBe(true)
test("Skipping UpstashRedisAdapter tests, since required environment variables aren't available", () => {
expect(true).toBe(true)
})
} else {
const client = upstashRedisClient(
process.env.UPSTASH_REDIS_URL,
Expand Down
8 changes: 8 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
"dependsOn": ["lint", "build"],
"outputs": []
},
"@next-auth/upstash-redis-adapter#test": {
"dependsOn": [
"lint",
"build",
"$UPSTASH_REDIS_KEY",
"$UPSTASH_REDIS_URL"
]
},
"lint": {},
"setup": {},
"dev": {
Expand Down

0 comments on commit f1af3ff

Please sign in to comment.