Skip to content

Commit 5f5cbb1

Browse files
Apply suggestion from @yanthomasdev
Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.com>
1 parent 3e8f9bc commit 5f5cbb1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cypress/e2e/common/spec_utils.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ export const afterEach = (taskResult, backend) => {
3636
const spec = Cypress.mocha.getRunner().suite.ctx.currentTest.parent.title;
3737
const testName = Cypress.mocha.getRunner().suite.ctx.currentTest.title;
3838

39-
console.log(`Starting teardown for: ${spec} - ${testName}`);
40-
const startTime = Date.now();
39+
let startTime;
40+
cy.then(() => {
41+
startTime = Date.now();
42+
console.log(`Starting teardown for: ${spec} - ${testName}`);
43+
});
4144

4245
cy.task('teardownBackendTest', {
4346
backend,

0 commit comments

Comments
 (0)