Skip to content

Commit 480978b

Browse files
committed
add test for check error
1 parent b42b1b1 commit 480978b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/app.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('Tarantool Connection tests', function(){
9696
it('a lot of insert', function(done){
9797
var promises = [];
9898
for (var i = 0; i <= 1000; i++) {
99-
conn.insert(512, ['key' + i, i]); // ok
99+
conn.insert(512, ['key' + i, i]);
100100
}
101101
Promise.all(promises)
102102
.then(function(pr){
@@ -105,6 +105,15 @@ describe('Tarantool Connection tests', function(){
105105
.catch(function(e){
106106
done(e);
107107
});
108-
})
108+
});
109+
it('check errors', function(done){
110+
conn.insert(512, ['key', 'key', 'key'])
111+
.then(function(){
112+
done(new Error('Right when need error'));
113+
})
114+
.catch(function(e){
115+
done();
116+
});
117+
});
109118
});
110119
});

0 commit comments

Comments
 (0)