Skip to content

Commit

Permalink
readme: add same level nested steps
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalets committed Dec 18, 2024
1 parent 88e8f05 commit 03efbf9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,19 @@ test('my test', async () => {
> [!IMPORTANT]
> Code **indentation** is important! Consider using [Prettier](https://prettier.io/) or other auto-formatting tools.
If you need the same level steps to be nested - use anonymous `{}` block:
```ts
test('my test', async () => {
// step: login
{
// step: Open home page
await page.goto('/');
// step: Perform auth
await page.goto('/login');
}
});
```

### Variables
You can use variables in step text like in template literals:

Expand Down

0 comments on commit 03efbf9

Please sign in to comment.