Skip to content

Commit aef68e5

Browse files
committed
fix: tests on Windows machines
1 parent d0e5d78 commit aef68e5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/__tests__/render-basics.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,24 @@ test('Should handle argument passing', async () => {
1818
})
1919

2020
test('Is able to make terminal input and view in-progress stdout', async () => {
21-
const {cleanup, findByText} = await render('node', [
21+
const props = await render('node', [
2222
resolve(__dirname, './execute-scripts/stdio-inquirer.js'),
2323
])
2424

25+
const {cleanup, findByText} = props;
26+
2527
const instance = await findByText('First option')
2628

2729
expect(instance).toBeTruthy()
2830

29-
expect(await findByText('❯ One')).toBeTruthy()
31+
// Windows uses ">", Linux/MacOS use "❯"
32+
expect(await findByText(/[>] One/)).toBeTruthy()
3033

3134
cleanup()
3235

3336
fireEvent.down(instance)
3437

35-
expect(await findByText('❯ Two')).toBeTruthy()
38+
expect(await findByText(/[>] Two/)).toBeTruthy()
3639

3740
cleanup()
3841

0 commit comments

Comments
 (0)