Skip to content

Commit 74c8f5c

Browse files
committed
docs: update the reference of "toBeInTheConsole"
1 parent e745024 commit 74c8f5c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,27 +69,28 @@ const {resolve} = require('path')
6969
const {render} = require('cli-testing-library')
7070

7171
test('Is able to make terminal input and view in-progress stdout', async () => {
72-
const {cleanup, findByText, userEvent} = await render('node', [
72+
const {cleanup, findByText, queryByText, userEvent} = await render('node', [
7373
resolve(__dirname, './execute-scripts/stdio-inquirer.js'),
7474
])
7575

7676
const instance = await findByText('First option')
7777

78-
expect(instance).toBeTruthy()
78+
expect(instance).toBeInTheConsole()
7979

80-
expect(await findByText('❯ One')).toBeTruthy()
80+
expect(await findByText('❯ One')).toBeInTheConsole()
8181

8282
cleanup()
8383

8484
userEvent("[ArrowDown]")
8585

86-
expect(await findByText('❯ Two')).toBeTruthy()
86+
expect(await findByText('❯ Two')).toBeInTheConsole()
8787

8888
cleanup()
8989

9090
userEvent.keyboard("[Enter]")
9191

92-
expect(await findByText('First option: Two')).toBeTruthy()
92+
expect(await findByText('First option: Two')).toBeInTheConsole()
93+
expect(await queryByText('First option: Three')).not.toBeInTheConsole()
9394
})
9495
```
9596

0 commit comments

Comments
 (0)