Closed Pyrolistical closed 11 months ago
I think it has something to do with how the errors from the test are serialized to the test runner. By the time it gets to class TestsStream
, it is already broken.
I found the issue. It is caused by the Object.create
in queryError
This hack fixes the issues:
function queryError(query, err) {
query.reject(err)
// query.reject(Object.create(err, {
// stack: { value: err.stack + query.origin.replace(/.*\n/, '\n'), enumerable: options.debug },
// query: { value: query.string, enumerable: options.debug },
// parameters: { value: query.parameters, enumerable: options.debug },
// args: { value: query.args, enumerable: options.debug },
// types: { value: query.statement && query.statement.types, enumerable: options.debug }
// }))
}
Env:
Given
repo.js
Run
node --test repo.js
Expected
Actual