1
- import { container , DbContext } from "./fixture/db" ; // eslint-disable-line no-unused-vars
1
+ import { container , DbContext } from "./fixture/db" ;
2
2
import { createPool } from "./fixture/client" ;
3
- import { createServer , Server } from "http" ; // eslint-disable-line no-unused-vars
3
+ import { createServer , Server } from "http" ;
4
4
import { freeport } from "./fixture/freeport" ;
5
5
import { PgMutationUpsertPlugin } from "../postgraphile-upsert" ;
6
- import { Pool } from "pg" ; // eslint-disable-line no-unused-vars
6
+ import { Pool } from "pg" ;
7
7
import { postgraphile } from "postgraphile" ;
8
- import ava , { TestFn , ExecutionContext } from "ava" ; // eslint-disable-line no-unused-vars
8
+ import ava , { TestFn , ExecutionContext } from "ava" ;
9
9
import nanographql = require( "nanographql" ) ;
10
10
import Bluebird = require( "bluebird" ) ;
11
11
import fetch from "node-fetch" ;
@@ -25,7 +25,7 @@ test.beforeEach(async (t) => {
25
25
await container . setup ( t . context ) ;
26
26
await Bluebird . delay ( 5000 ) ;
27
27
t . context . client = await createPool ( t . context . dbConfig ) ;
28
- t . context . client . on ( "error" , ( err ) => { } ) ; // eslint-disable-line
28
+ t . context . client . on ( "error" , ( _err ) => { } ) ;
29
29
await t . context . client . query ( `
30
30
create table bikes (
31
31
id serial,
@@ -63,9 +63,9 @@ test.beforeEach(async (t) => {
63
63
64
64
test . afterEach ( async ( t ) => {
65
65
t . context . client . on ( "error" , ( ) => null ) ;
66
+ container . teardown ( t . context ) . catch ( console . error ) ;
66
67
await t . context . middleware . release ( ) ;
67
68
await new Promise ( ( res ) => t . context . server . close ( res ) ) ;
68
- await container . teardown ( t . context ) ;
69
69
} ) ;
70
70
71
71
const execGqlOp = ( t : PluginExecutionContext , query : ( ) => string ) =>
0 commit comments