Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 630 Bytes

File metadata and controls

30 lines (24 loc) · 630 Bytes

Disallow nested test.step() methods (no-nested-step)

Nesting test.step() methods can make your tests difficult to read.

Rule Details

Examples of incorrect code for this rule:

test('foo', async () => {
  await test.step('step1', async () => {
    await test.step('nest step', async () => {
      await expect(true).toBe(true)
    })
  })
})

Examples of correct code for this rule:

test('foo', async () => {
  await test.step('step1', async () => {
    await expect(true).toBe(true)
  })
  await test.step('step2', async () => {
    await expect(true).toBe(true)
  })
})