Skip to content

Commit 54af64f

Browse files
committed
update deps and fix tests
1 parent 06180a8 commit 54af64f

File tree

10 files changed

+3213
-3130
lines changed

10 files changed

+3213
-3130
lines changed

__tests__/helpers.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ const { readFile } = require('fs');
44
const pgConnectionString = require('pg-connection-string');
55
const { createPostGraphileSchema } = require('postgraphile-core');
66

7-
// This test suite can be flaky. Increase it’s timeout.
8-
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 20;
9-
107
function readFilePromise(filename, encoding) {
118
return new Promise((resolve, reject) => {
129
readFile(filename, encoding, (err, res) => {
@@ -37,6 +34,7 @@ const withPgClient = async (url, fn) => {
3734
await client.release();
3835
} catch (e) {
3936
console.error('Error releasing pgClient', e);
37+
throw e;
4038
}
4139
await pgPool.end();
4240
}
@@ -86,7 +84,7 @@ const withPrepopulatedDb = async (fn) => {
8684
}
8785
};
8886

89-
withPrepopulatedDb.setup = (done) => {
87+
withPrepopulatedDb.setup = async () => {
9088
if (prepopulatedDBKeepalive) {
9189
throw new Error("There's already a prepopulated DB running");
9290
}
@@ -104,10 +102,9 @@ withPrepopulatedDb.setup = (done) => {
104102
prepopulatedDBKeepalive.vars = await populateDatabase(client);
105103
} catch (e) {
106104
console.error('FAILED TO PREPOPULATE DB!', e.message); // eslint-disable-line no-console
107-
return done(e);
105+
throw e;
108106
}
109107
await client.query('SAVEPOINT pristine;');
110-
done();
111108
return prepopulatedDBKeepalive;
112109
});
113110
};

0 commit comments

Comments
 (0)