diff --git a/integrationTests/integration-test.js b/integrationTests/integration-test.js index 8055f713f1..cd295b52fd 100644 --- a/integrationTests/integration-test.js +++ b/integrationTests/integration-test.js @@ -22,19 +22,19 @@ describe('Integration Tests', () => { const distDir = path.resolve('./npmDist'); exec(`npm pack ${distDir} && cp graphql-*.tgz graphql.tgz`, { cwd: tmpDir }); - it('Should compile with all supported TS versions', () => { - exec(`cp -R ${path.join(__dirname, 'ts')} ${tmpDir}`); + function testOnNodeProject(projectName) { + exec(`cp -R ${path.join(__dirname, projectName)} ${tmpDir}`); - const cwd = path.join(tmpDir, 'ts'); - exec('npm install --silent', { cwd }); + const cwd = path.join(tmpDir, projectName); + exec('npm install --quiet', { cwd }); exec('npm test', { cwd }); + } + + it('Should compile with all supported TS versions', () => { + testOnNodeProject('ts'); }).timeout(40000); it('Should work on all supported node versions', () => { - exec(`cp -R ${path.join(__dirname, 'node')} ${tmpDir}`); - - const cwd = path.join(tmpDir, 'node'); - exec('npm install', { cwd }); - exec('npm test', { cwd }); + testOnNodeProject('node'); }).timeout(40000); }); diff --git a/integrationTests/node/package.json b/integrationTests/node/package.json index 1ab7b5a895..0fcde94963 100644 --- a/integrationTests/node/package.json +++ b/integrationTests/node/package.json @@ -1,4 +1,5 @@ { + "private": true, "scripts": { "test": "node test.js" }, diff --git a/integrationTests/ts/package.json b/integrationTests/ts/package.json index ba3c02e0f4..f95cc44556 100644 --- a/integrationTests/ts/package.json +++ b/integrationTests/ts/package.json @@ -1,4 +1,5 @@ { + "private": true, "scripts": { "test": "node test.js" },