Skip to content

Commit 312a7c1

Browse files
committed
Disable file-upload tests on Node.js 14.
Node.js 14 is not LTS yet, but we want to make sure that we're preparing for and breaking changes that it brings. We can't support uploads on Node.js 14 before we upgrade to `graphql-upload` version 10, which is a major breaking change for current upload users. We're very aware (via issues like #3508) that we won't support it on Node.js 14 without updating it to a newer version. In a conflicting vein though, we're actually removing `graphql-upload` from Apollo Server 3.x (and letting the package be usable by itself), so this just allows us to test the rest of our stack which we intend to support on Node.js 14, while recognizing that we're not intending on supporting uploads as a built-in.
1 parent b90b46c commit 312a7c1

File tree

5 files changed

+18
-15
lines changed

5 files changed

+18
-15
lines changed

packages/apollo-server-express/src/__tests__/ApolloServer.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,9 @@ describe('apollo-server-express', () => {
480480
});
481481
});
482482
});
483-
// NODE: Skip Node.js 6, but only because `graphql-upload`
484-
// doesn't support it.
485-
(NODE_MAJOR_VERSION === 6 ? describe.skip : describe)(
483+
// NODE: Skip Node.js 6 and 14, but only because `graphql-upload`
484+
// doesn't support them on the version we use.
485+
([6, 14].includes(NODE_MAJOR_VERSION) ? describe.skip : describe)(
486486
'file uploads',
487487
() => {
488488
it('enabled uploads', async () => {

packages/apollo-server-fastify/src/__tests__/ApolloServer.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ describe('apollo-server-fastify', () => {
441441
});
442442
});
443443
});
444-
// NODE: Skip Node.js 6, but only because `graphql-upload`
445-
// doesn't support it.
446-
(NODE_MAJOR_VERSION === 6 ? describe.skip : describe)(
444+
// NODE: Skip Node.js 6 and 14, but only because `graphql-upload`
445+
// doesn't support them on the version we use.
446+
([6, 14].includes(NODE_MAJOR_VERSION) ? describe.skip : describe)(
447447
'file uploads',
448448
() => {
449449
it('enabled uploads', async () => {

packages/apollo-server-koa/src/__tests__/ApolloServer.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ const resolvers = {
342342
});
343343
});
344344
});
345-
// NODE: Skip Node.js 6, but only because `graphql-upload`
346-
// doesn't support it anymore.
347-
(NODE_MAJOR_VERSION === 6 ? describe.skip : describe)(
345+
// NODE: Skip Node.js 6 and 14, but only because `graphql-upload`
346+
// doesn't support them on the version we use.
347+
([6, 14].includes(NODE_MAJOR_VERSION) ? describe.skip : describe)(
348348
'file uploads',
349349
() => {
350350
it('enabled uploads', async () => {

packages/apollo-server-lambda/src/__tests__/lambdaApollo.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,12 @@ const resolvers = {
106106
},
107107
};
108108

109-
// NODE: graphql-upload (8.0.0) requires Node 8.5 or higher
110109

111-
(NODE_MAJOR_VERSION < 8 ? describe.skip : describe)('file uploads', () => {
110+
// NODE: Skip Node.js 6 and 14, but only because `graphql-upload`
111+
// doesn't support them on the version use use.
112+
(
113+
[6, 14].includes(NODE_MAJOR_VERSION) ? describe.skip : describe
114+
)('file uploads', () => {
112115
let app = <any>null
113116
beforeAll(async () => {
114117
app = await createLambda({

packages/apollo-server-micro/src/__tests__/ApolloServer.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ describe('apollo-server-micro', function() {
146146
});
147147
});
148148

149-
// NODE: Intentionally skip file upload tests on Node.js 10.
150-
// Also skip Node.js 6, but only because `graphql-upload`
151-
// doesn't support it.
152-
(NODE_MAJOR_VERSION === 6 ? describe.skip : describe)(
149+
150+
// NODE: Skip Node.js 6 and 14, but only because `graphql-upload`
151+
// doesn't support them on the version we use.
152+
([6, 14].includes(NODE_MAJOR_VERSION) ? describe.skip : describe)(
153153
'file uploads',
154154
function() {
155155
it('should handle file uploads', async function() {

0 commit comments

Comments
 (0)