https://cypress.io logo
Definition of variables and constants should be do...
# best-practices
p
Definition of variables and constants should be done up where the
it('',(here)=>{})
is written, so you can clearly see what data you have to use in the test, especially when you want a random number to be used on separate places, having
const
and
let
inside the test just breaks the visual appearance of the test. If anyone have better way or think this is wrong for any reason, please i'm up for discussion and finding the best possible way. My first and foremost priority is write clean code to teach QAs without any experience in js