expect(err.message).to.match(/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/);
expect(err.sql).to.equal('SELECT 1+1');
});
it('does not allow queries after commit',asyncfunction(){
/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/
expect(err.message).to.match(/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/);
expect(err.sql).to.equal('SELECT 1+1');
})
);
});
})
).to.be.eventually.fulfilled;
it('does not allow queries immediately after commit call',asyncfunction(){
/commit has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/
expect(err.message).to.match(/rollback has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/);
/rollback has been called on this transaction\([^)]+\), you can no longer use it\.\(The rejected query is attached as the 'sql' property of this error\)/