Suppress Test Logs (#6256)
* Suppress Test Logs This will reduce some of the noise in the tests logs. * replace deprecated buffer * remove deprecation warnings * fix geopoint * Fix GraphQL * postgres warnings
This commit is contained in:
@@ -77,8 +77,7 @@ function getAppleCertificate(publicKeyUrl) {
|
||||
}
|
||||
|
||||
function convertTimestampToBigEndian(timestamp) {
|
||||
const buffer = new Buffer(8);
|
||||
buffer.fill(0);
|
||||
const buffer = Buffer.alloc(8);
|
||||
|
||||
const high = ~~(timestamp / 0xffffffff);
|
||||
const low = timestamp % (0xffffffff + 0x1);
|
||||
|
||||
@@ -13,6 +13,8 @@ export function createClient(uri, databaseOptions) {
|
||||
}
|
||||
|
||||
const initOptions = dbOptions.initOptions || {};
|
||||
initOptions.noWarnings = process && process.env.TESTING;
|
||||
|
||||
const pgp = require('pg-promise')(initOptions);
|
||||
const client = pgp(dbOptions);
|
||||
|
||||
|
||||
@@ -343,7 +343,9 @@ export function handleParseErrors(err, req, res, next) {
|
||||
} else if (err.status && err.message) {
|
||||
res.status(err.status);
|
||||
res.json({ error: err.message });
|
||||
next(err);
|
||||
if (!(process && process.env.TESTING)) {
|
||||
next(err);
|
||||
}
|
||||
} else {
|
||||
log.error('Uncaught internal server error.', err, err.stack);
|
||||
res.status(500);
|
||||
@@ -351,7 +353,9 @@ export function handleParseErrors(err, req, res, next) {
|
||||
code: Parse.Error.INTERNAL_SERVER_ERROR,
|
||||
message: 'Internal server error.',
|
||||
});
|
||||
next(err);
|
||||
if (!(process && process.env.TESTING)) {
|
||||
next(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user