You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've searched existing issues and found nothing related to my issue.
Describe the bug
An exception thrown when adding a function with setTimeout on the tests section :
Function
test("res.status should be 200", function(done) {
const data = res.getBody();
expect(res.getStatus()).to.equal(200);
setTimeout(function() {
done();
}, 1000); // Ajoutez un délai de 1 seconde avant de terminer le test
});
test("res.body should be correct", function(done) {
let data = res.getBody();
let productWithContractType = data.find(product =>
product.productOffering && product.productOffering["@type"] === "Contract"
);
if (productWithContractType) {
console.log("Product ID with productOffering @type 'Contract':", productWithContractType.operationalStatus);
expect(productWithContractType.operationalStatus).to.equal('Confirmed');
}
setTimeout(function() {
done();
}, 2000); // Ajoutez un délai de 2 secondes avant de terminer le test
});
.bru file to reproduce the bug
No response
Screenshots/Live demo link
The text was updated successfully, but these errors were encountered:
I have checked the following:
Describe the bug
An exception thrown when adding a function with setTimeout on the tests section :
Function
test("res.status should be 200", function(done) {
const data = res.getBody();
expect(res.getStatus()).to.equal(200);
setTimeout(function() {
done();
}, 1000); // Ajoutez un délai de 1 seconde avant de terminer le test
});
test("res.body should be correct", function(done) {
let data = res.getBody();
let productWithContractType = data.find(product =>
product.productOffering && product.productOffering["@type"] === "Contract"
);
if (productWithContractType) {
console.log("Product ID with productOffering @type 'Contract':", productWithContractType.operationalStatus);
expect(productWithContractType.operationalStatus).to.equal('Confirmed');
}
setTimeout(function() {
done();
}, 2000); // Ajoutez un délai de 2 secondes avant de terminer le test
});
.bru file to reproduce the bug
No response
Screenshots/Live demo link
The text was updated successfully, but these errors were encountered: