test-integration add occurence count on logs message

pull/1137/head
Audric Ackermann 5 years ago
parent 1144609c2a
commit f041360a62
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -621,12 +621,19 @@ module.exports = {
const foundLines = renderLogs.filter(log => log.message.includes(str));
// eslint-disable-next-line no-unused-expressions
chai.expect(foundLines.length > 0, `'${str}' not found in logs but was expected`).to.be
.true;
chai.expect(
foundLines.length > 0,
`'${str}' not found in logs but was expected`
).to.be.true;
if (count) {
// eslint-disable-next-line no-unused-expressions
chai.expect(foundLines.length, `'${str}' found but not the correct number of times`).to.be.equal(count);
chai
.expect(
foundLines.length,
`'${str}' found but not the correct number of times`
)
.to.be.equal(count);
}
},

Loading…
Cancel
Save