The purpose of describe is to allow BDD format:
describe('Given user logins', () => {
describe('Given user Selects payment', () => {
describe('Given user clicks pay', () => {
it('Then deducts payment', () => {
})
})
})
})
So it's perfectly fine to nextnest the describe. You can rightwrite steps in each describe blocblock using beforeEach
describe('Given user logins', () => {
beforeEach(async function() {
login();
});
describe('Given user Selects payment', () => {
beforeEach(async function() {
selectpayment();
});
describe('Given user clicks pay', () => {
it('Then deducts payment', () => {
})
})
})
})