diff --git a/packages/prompt/test/checkbox_test.ts b/packages/prompt/test/checkbox_test.ts index 95711296..fe915822 100644 --- a/packages/prompt/test/checkbox_test.ts +++ b/packages/prompt/test/checkbox_test.ts @@ -30,7 +30,7 @@ Deno.test( 'prompt checkbox: invalid value', async () => { message: 'message', options: [ { value: 'value1' }, { value: 'value2' }, 'value3' ] } ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt checkbox: null value', async () => { @@ -41,5 +41,5 @@ Deno.test( 'prompt checkbox: null value', async () => { message: 'message', options: [ { value: 'value1' }, { value: 'value2' }, 'value3' ] } ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); diff --git a/packages/prompt/test/confirm_test.ts b/packages/prompt/test/confirm_test.ts index 1d809115..bccc0f05 100644 --- a/packages/prompt/test/confirm_test.ts +++ b/packages/prompt/test/confirm_test.ts @@ -35,7 +35,7 @@ Deno.test( 'prompt confirm: empty value', async () => { await assertThrowsAsync( async () => { Confirm.inject( '' ); await Confirm.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt confirm: invalid value', async () => { @@ -43,7 +43,7 @@ Deno.test( 'prompt confirm: invalid value', async () => { await assertThrowsAsync( async () => { Confirm.inject( 'noo' ); await Confirm.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt confirm: null value', async () => { @@ -51,5 +51,5 @@ Deno.test( 'prompt confirm: null value', async () => { await assertThrowsAsync( async () => { Confirm.inject( null as any ); await Confirm.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); diff --git a/packages/prompt/test/input_test.ts b/packages/prompt/test/input_test.ts index 63a2c02d..43019a2c 100644 --- a/packages/prompt/test/input_test.ts +++ b/packages/prompt/test/input_test.ts @@ -24,7 +24,7 @@ Deno.test( 'prompt input: empty value', async () => { await assertThrowsAsync( async () => { Input.inject( '' ); await Input.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt input: invalid value', async () => { @@ -35,7 +35,7 @@ Deno.test( 'prompt input: invalid value', async () => { message: 'message', validate: value => value.length < 10 } ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt input: null value', async () => { @@ -43,5 +43,5 @@ Deno.test( 'prompt input: null value', async () => { await assertThrowsAsync( async () => { Input.inject( null as any ); await Input.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); diff --git a/packages/prompt/test/list_test.ts b/packages/prompt/test/list_test.ts index 0857568a..e08a74e5 100644 --- a/packages/prompt/test/list_test.ts +++ b/packages/prompt/test/list_test.ts @@ -44,7 +44,7 @@ Deno.test( 'prompt list: empty value', async () => { await assertThrowsAsync( async () => { List.inject( '' ); await List.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); // @TODO: add maxLength option to list pormpt @@ -53,5 +53,5 @@ Deno.test('prompt list: null value', async () => { await assertThrowsAsync( async () => { List.inject( null as any ); await List.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); diff --git a/packages/prompt/test/number_test.ts b/packages/prompt/test/number_test.ts index c905e286..71c545f6 100644 --- a/packages/prompt/test/number_test.ts +++ b/packages/prompt/test/number_test.ts @@ -27,19 +27,19 @@ Deno.test( 'prompt number: empty value', async () => { await assertThrowsAsync( async () => { Number.inject( '' ); await Number.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt number: invalid value', async () => { await assertThrowsAsync( async () => { Number.inject( 'abc' ); await Number.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt number: null value', async () => { await assertThrowsAsync( async () => { Number.inject( null as any ); await Number.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); diff --git a/packages/prompt/test/select_test.ts b/packages/prompt/test/select_test.ts index 170f0d08..33bd7754 100644 --- a/packages/prompt/test/select_test.ts +++ b/packages/prompt/test/select_test.ts @@ -19,7 +19,7 @@ Deno.test( 'prompt select: empty value', async () => { message: 'message', options: [ { value: 'value1' }, { value: 'value2' }, 'value3' ] } ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt select: invalid value', async () => { @@ -29,7 +29,7 @@ Deno.test( 'prompt select: invalid value', async () => { message: 'message', options: [ { value: 'value1' }, { value: 'value2' }, 'value3' ] } ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt select: null value', async () => { @@ -39,5 +39,5 @@ Deno.test( 'prompt select: null value', async () => { message: 'message', options: [ { value: 'value1' }, { value: 'value2' }, 'value3' ] } ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); diff --git a/packages/prompt/test/toggle_test.ts b/packages/prompt/test/toggle_test.ts index acf43b25..9081684e 100644 --- a/packages/prompt/test/toggle_test.ts +++ b/packages/prompt/test/toggle_test.ts @@ -21,7 +21,7 @@ Deno.test( 'prompt toggle: empty value', async () => { await assertThrowsAsync( async () => { Toggle.inject( '' ); await Toggle.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt toggle: invalid value', async () => { @@ -29,7 +29,7 @@ Deno.test( 'prompt toggle: invalid value', async () => { await assertThrowsAsync( async () => { Toggle.inject( 'aaa' ); await Toggle.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } ); Deno.test( 'prompt toggle: null value', async () => { @@ -37,5 +37,5 @@ Deno.test( 'prompt toggle: null value', async () => { await assertThrowsAsync( async () => { Toggle.inject( null as any ); await Toggle.prompt( 'message' ); - }, Error, red( `${ bold( ' ✘ ' ) }Invalid answer.` ) ); + }, Error, red( `${ Deno.build.os === 'windows' ? bold( ' × ' ) : bold( ' ✘ ' ) }Invalid answer.` ) ); } );