@@ -15,7 +15,7 @@ import {
1515 Throwscape ,
1616} from "shescape/testing" ;
1717
18- import { arbitrary } from "../_.js" ;
18+ import { arbitrary , constants } from "../_.js" ;
1919
2020test ( "injection strings" , ( t ) => {
2121 t . true ( Array . isArray ( injectionStrings ) ) ;
@@ -77,7 +77,13 @@ testProp(
7777
7878testProp (
7979 "Stubscape#escape (stubscape =~ shescape)" ,
80- [ fc . anything ( ) , arbitrary . shescapeOptions ( ) ] ,
80+ [
81+ fc . oneof (
82+ fc . anything ( ) ,
83+ fc . constantFrom ( ...constants . illegalArguments . map ( ( arg ) => arg . value ) ) ,
84+ ) ,
85+ arbitrary . shescapeOptions ( ) ,
86+ ] ,
8187 ( t , arg , options ) => {
8288 let result , stubResult , errored , stubErrored ;
8389
@@ -109,7 +115,15 @@ testProp(
109115
110116testProp (
111117 "Stubscape#escapeAll (stubscape =~ shescape)" ,
112- [ fc . anything ( ) , arbitrary . shescapeOptions ( ) ] ,
118+ [
119+ fc . oneof (
120+ fc . anything ( ) ,
121+ fc . constantFrom (
122+ ...constants . illegalArgumentLists . map ( ( args ) => args . value ) ,
123+ ) ,
124+ ) ,
125+ arbitrary . shescapeOptions ( ) ,
126+ ] ,
113127 ( t , args , options ) => {
114128 let result , stubResult , errored , stubErrored ;
115129
@@ -141,7 +155,13 @@ testProp(
141155
142156testProp (
143157 "Stubscape#quote, with shell (stubscape =~ shescape)" ,
144- [ fc . anything ( ) , arbitrary . shescapeOptions ( ) ] ,
158+ [
159+ fc . oneof (
160+ fc . anything ( ) ,
161+ fc . constantFrom ( ...constants . illegalArguments . map ( ( arg ) => arg . value ) ) ,
162+ ) ,
163+ arbitrary . shescapeOptions ( ) ,
164+ ] ,
145165 ( t , arg , options ) => {
146166 let result , stubResult , errored , stubErrored ;
147167
@@ -185,7 +205,15 @@ test("stubscape#quote with shell set to false", (t) => {
185205
186206testProp (
187207 "Stubscape#quoteAll, with shell (stubscape =~ shescape)" ,
188- [ fc . anything ( ) , arbitrary . shescapeOptions ( ) ] ,
208+ [
209+ fc . oneof (
210+ fc . anything ( ) ,
211+ fc . constantFrom (
212+ ...constants . illegalArgumentLists . map ( ( args ) => args . value ) ,
213+ ) ,
214+ ) ,
215+ arbitrary . shescapeOptions ( ) ,
216+ ] ,
189217 ( t , args , options ) => {
190218 let result , stubResult , errored , stubErrored ;
191219
0 commit comments