Skip to content

Commit 675f038

Browse files
committed
Merge branch 'em/deploy-update' of https://github.com/oslabs-beta/GraphQL-Gate into em/deploy-update
2 parents 86f7072 + 6dc15a7 commit 675f038

File tree

4 files changed

+32
-15
lines changed

4 files changed

+32
-15
lines changed

.eslintrc.json

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,25 @@
1515
"parser": "@typescript-eslint/parser",
1616
"parserOptions": {
1717
"ecmaVersion": "latest",
18-
"project": "./tsconfig.json"
18+
"project": "./tsconfig.eslint.json"
1919
},
20-
"plugins": ["import", "prettier"],
20+
"plugins": [
21+
"import",
22+
"prettier"
23+
],
2124
"rules": {
22-
"no-plusplus": [2, {
23-
"allowForLoopAfterthoughts": true
24-
}],
25+
"no-plusplus": [
26+
2,
27+
{
28+
"allowForLoopAfterthoughts": true
29+
}
30+
],
2531
"prettier/prettier": [
2632
"error"
2733
]
28-
},
29-
"ignorePatterns": ["jest.*", "build/*"]
30-
}
34+
},
35+
"ignorePatterns": [
36+
"jest.*",
37+
"dist/*"
38+
]
39+
}

test/middleware/express.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ describe('Express Middleware tests', () => {
433433
});
434434

435435
test('Multiple valid requests at > 10 second intervals', async () => {
436-
const requests = [];
436+
const requests: Array<void> = [];
437437
for (let i = 0; i < 3; i++) {
438438
requests.push(
439439
middleware(
@@ -453,7 +453,7 @@ describe('Express Middleware tests', () => {
453453
});
454454

455455
test('Multiple valid requests at within one second', async () => {
456-
const requests = [];
456+
const requests: Array<void> = [];
457457

458458
for (let i = 0; i < 3; i++) {
459459
// Send 3 queries of complexity 2. These should all succeed
@@ -514,7 +514,7 @@ describe('Express Middleware tests', () => {
514514
});
515515

516516
test('Multiple queries that exceed token limit', async () => {
517-
const requests = [];
517+
const requests: Array<void> = [];
518518

519519
for (let i = 0; i < 5; i++) {
520520
// Send 5 queries of complexity 2. These should all succeed
@@ -549,7 +549,9 @@ describe('Express Middleware tests', () => {
549549
expect(mockResponse.json).toBeCalled();
550550
});
551551

552-
xtest('Retry-After header is on blocked response', () => {});
552+
xtest('Retry-After header is on blocked response', () => {
553+
// TODO:
554+
});
553555
});
554556
});
555557

tsconfig.eslint.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "tsconfig.json",
3+
"include": [
4+
"test/*",
5+
"src"
6+
]
7+
}

tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@
3636
"include": [
3737
"src/**/*.ts",
3838
"src/**/*.js",
39-
"test/**/*.ts",
40-
"test/**/*.js"
4139
],
4240
"exclude": [
4341
"node_modules",
4442
"**/*.spec.ts",
45-
"dist"
43+
"dist",
44+
"test"
4645
]
4746
}

0 commit comments

Comments
 (0)