Skip to content

Commit 0dc5158

Browse files
committed
chore: Update CONTRIBUTING.md [skip ci]
1 parent 3e06aaf commit 0dc5158

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

CONTRIBUTING.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,13 @@ In the Jest environment for E2E testing, an object called `session` is exposed i
3737

3838
```typescript
3939
// To simulate a single user
40-
sessions.use(async session => {
41-
await session.rest.v1.statuses.$select("123").fetch();
42-
});
40+
await using session = await sessions.acquire();
41+
await session.rest.v1.statuses.$select("123").fetch();
4342

4443
// To simulate an interaction between two users
45-
sessions.use(2, async ([alice, bob]) => {
46-
await alice.rest.v1.statuses.create({
47-
`Hello @${bob.account.acct}`
48-
})
49-
});
44+
await using alice = await sessions.acquire();
45+
await using bob = await sessions.acquire();
46+
await alice.rest.v1.statuses.create({ status: `Hello @${bob.account.acct}` });
5047
```
5148

5249
The tests are automatically run by CI, but if you need to check them locally, please refer to the GitHub Actions workflow in the repository to set up your environment. For other ways to write tests, please refer to the official Jest documentation.

0 commit comments

Comments
 (0)