Skip to content

Commit

Permalink
Testing flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KiraElric007 committed Dec 12, 2023
1 parent 5a59591 commit 240dfe1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/library/run-options.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ describe('Newman run options', function () {
}, function (err, summary) {
expect(err).to.be.null;
expect(summary.run.failures).to.be.an('array').that.has.lengthOf(1);
expect(summary.run.failures[0].error.message).to.equal('ESOCKETTIMEDOUT');
// The timeout can happen before or after the connection has been established. Thus testing
// for both 'ETIMEDOUT' and 'ESOCKETTIMEDOUT'
expect(summary.run.failures[0].error.message).to.be.oneOf(['ETIMEDOUT', 'ESOCKETTIMEDOUT']);
done();
});
});
Expand Down

0 comments on commit 240dfe1

Please sign in to comment.