File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,21 +18,24 @@ test('Should handle argument passing', async () => {
1818} )
1919
2020test ( '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 ( / [ ❯ > ] O n e / ) ) . toBeTruthy ( )
3033
3134 cleanup ( )
3235
3336 fireEvent . down ( instance )
3437
35- expect ( await findByText ( '❯ Two' ) ) . toBeTruthy ( )
38+ expect ( await findByText ( / [ ❯ > ] T w o / ) ) . toBeTruthy ( )
3639
3740 cleanup ( )
3841
You can’t perform that action at this time.
0 commit comments