Skip to content

Commit

Permalink
made timing test less strict again
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWise committed Jun 20, 2023
1 parent d17623c commit 4b46807
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/37.timeout-between-each.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ describe('.timeoutBetweenEach()', function () {
return expect(promise).to.become('abc');
});
it('should timeout if data is not received soon enough', function () {
const promise = River.from([after(10, 'a'), after(50, 'b'), after(150, 'c')])
const promise = River.from([after(10, 'a'), after(50, 'b'), after(200, 'c')])
.timeoutBetweenEach(60)
.all();
return expect(promise).to.be.rejectedWith(River.TimeoutError);
});
it('should accept a string reason', function () {
const promise = River.from([after(10, 'a'), after(50, 'b'), after(150, 'c')])
const promise = River.from([after(10, 'a'), after(50, 'b'), after(200, 'c')])
.timeoutBetweenEach(60, 'foobar')
.all();
return expect(promise).to.be.rejectedWith(/^foobar$/);
});
it('should accept an Error reason', function () {
const err = new TypeError('foobar');
const promise = River.from([after(10, 'a'), after(50, 'b'), after(150, 'c')])
const promise = River.from([after(10, 'a'), after(50, 'b'), after(200, 'c')])
.timeoutBetweenEach(60, err)
.all();
return expect(promise).to.be.rejectedWith(err);
Expand Down

0 comments on commit 4b46807

Please sign in to comment.