Skip to content

Commit

Permalink
Run Redis tests only with v16
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 11, 2024
1 parent f8a81cc commit 8ca81bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/plugins/response-cache-redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"@envelop/core": "workspace:^",
"@graphql-tools/schema": "10.0.11",
"@types/ioredis": "4.28.10",
"graphql": "16.9.0",
"ioredis-mock": "5.9.1",
"typescript": "5.1.3"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { versionInfo } from 'graphql';
import Redis from 'ioredis';
import { useResponseCache } from '@envelop/response-cache';
import { createTestkit } from '@envelop/testing';
Expand All @@ -10,7 +11,9 @@ import {

jest.mock('ioredis', () => require('ioredis-mock/jest'));

describe('useResponseCache with Redis cache', () => {
const describeIf = (condition: boolean) => (condition ? describe : describe.skip);

describeIf(versionInfo.major >= 16)('useResponseCache with Redis cache', () => {
const redis = new Redis();
const cache = createRedisCache({ redis });

Expand Down
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8ca81bf

Please sign in to comment.