From 2698375fb26dd8b24a79e01db8f69df16972b8b8 Mon Sep 17 00:00:00 2001 From: Cory Forsyth Date: Fri, 1 Jul 2022 14:09:20 +0200 Subject: [PATCH] Update README: change `cleanup` -> `clear` The code example on the README uses a function `cleanup`, but I think it is supposed to be `clear`, as `cleanup` is not part of the `RenderResult` type but `clear` is. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9c51262..460e5b1 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ const {resolve} = require('path') const {render} = require('cli-testing-library') test('Is able to make terminal input and view in-progress stdout', async () => { - const {cleanup, findByText, queryByText, userEvent} = await render('node', [ + const {clear, findByText, queryByText, userEvent} = await render('node', [ resolve(__dirname, './execute-scripts/stdio-inquirer.js'), ]) @@ -79,13 +79,13 @@ test('Is able to make terminal input and view in-progress stdout', async () => { expect(await findByText('❯ One')).toBeInTheConsole() - cleanup() + clear() userEvent('[ArrowDown]') expect(await findByText('❯ Two')).toBeInTheConsole() - cleanup() + clear() userEvent.keyboard('[Enter]')