Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit a948a08

Browse files
Isolate integration tests from repository (#671)
1 parent fc5dfa5 commit a948a08

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/node_modules
33
/coverage
44
/dist
5-
/integrationTmp
65

76
# Ignore TS files inside integration test
87
/integrationTests/ts/*.ts

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@
88
/node_modules
99
/coverage
1010
/dist
11-
/integrationTmp

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
/node_modules
33
/coverage
44
/dist
5-
/integrationTmp

cspell.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"node_modules",
77
"coverage",
88
"dist",
9-
"integrationTmp",
109

1110
// Excluded from spelling check
1211
"cspell.json",

integrationTests/integration-test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
'use strict';
44

5+
const os = require('os');
56
const fs = require('fs');
67
const path = require('path');
78
const childProcess = require('child_process');
@@ -16,10 +17,15 @@ function exec(command, options = {}) {
1617
}
1718

1819
describe('Integration Tests', () => {
19-
const tmpDir = path.resolve('./integrationTmp');
20+
const tmpDir = path.join(os.tmpdir(), 'graphql-js-integrationTmp');
2021
fs.rmdirSync(tmpDir, { recursive: true });
2122
fs.mkdirSync(tmpDir);
2223

24+
const distDir = path.resolve('./dist');
25+
exec(`npm pack ${distDir} && cp express-graphql-*.tgz express-graphql.tgz`, {
26+
cwd: tmpDir,
27+
});
28+
2329
it('Should compile with all supported TS versions', () => {
2430
exec(`cp -R ${path.join(__dirname, 'ts')} ${tmpDir}`);
2531

integrationTests/ts/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
},
55
"dependencies": {
66
"@types/node": "14.0.13",
7-
"express-graphql": "file:../../dist",
7+
"express-graphql": "file:../express-graphql.tgz",
8+
"graphql": "14.6.0",
89
"typescript-3.4": "npm:[email protected]",
910
"typescript-3.5": "npm:[email protected]",
1011
"typescript-3.6": "npm:[email protected]",

0 commit comments

Comments
 (0)