Replace `not.toBeEmpty` in two tests
What does this MR do and why?
#toBeEmpty
is imported from jQuery and the matcher tests :empty
pseudo class (HTML element with not children). Hence, these expectations don't work:
- expect([]).not.toBeEmpty() should fail, but it succeeds
- expect({}).not.toBeEmpty() should fail, but it succeeds
We disallow #toBeEmpty
in tests and substitute their usage for
alternative approaches:
- expect([].length).toBe(0)
- expect([1].length).toBeGreaterThan(0)
Screenshots or screen recordings
N/A
How to set up and validate locally
N/A
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Sanz García