Cypress · Middle · Question 12 of 77
Are aliases shared between tests?
- 1No, aliases are reset before each test
- 2Only aliases defined in
beforeare reset - 3Yes, aliases persist for the whole spec
Show the answer
Correct answer: No, aliases are reset before each test
Explanation
Define aliases in beforeEach if all tests need them. Using this.alias needs function () {} tests, not arrow functions.