Skip to content

Commit f322cee

Browse files
rbetjesjannyHou
authored andcommitted
Test should fail if no error is thrown
1 parent d5bb0bb commit f322cee

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

test/dashdb.dml.test.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,11 @@ describe('dml', function() {
4646
const rec = {aFloat: 42.234567};
4747
before(createRecInFP(rec));
4848

49-
it('should fail with a specific SQL error', function(done) {
50-
FloatingPoint.updateAll(rec, {aFloat: 42.234567890123456789},
51-
function(err, info) {
52-
if (err) {
53-
err.state.should.be.eql('HY094');
54-
done();
55-
}
56-
});
49+
it('should fail with a specific SQL error', async function() {
50+
await FloatingPoint.updateAll(rec, {aFloat: 42.234567890123456789})
51+
.should.be.rejectedWith(
52+
'[IBM][CLI Driver] CLI0135E Invalid scale value. SQLSTATE=HY094',
53+
);
5754
});
5855
});
5956
});

0 commit comments

Comments
 (0)