You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the real-life use case of needing to harden my tested (typescript) functions against invalid input.
Lets say a function under test accepts 2 arguments: an array and a string. Of course TS ensure during writing code that the types match. However, the functions input can also come from user input and/or remote server data and during runtime TS naturally has nothing to say ;)
So I came up with this helper function I think we could add to Fuzzers maybe or better integrate into jest as an expect extension?
It probes the function f with inputs of all kind of inputs: true, false, 0, "", undefined, null, [], {}.
I could imagine having a Fuzzer that can be created from given f and does not generate random values, but those testValues.
What do you think, does this make sense or is this out of scope for fuzzy testing?
The text was updated successfully, but these errors were encountered:
I have the real-life use case of needing to harden my tested (typescript) functions against invalid input.
Lets say a function under test accepts 2 arguments: an array and a string. Of course TS ensure during writing code that the types match. However, the functions input can also come from user input and/or remote server data and during runtime TS naturally has nothing to say ;)
So I came up with this helper function I think we could add to Fuzzers maybe or better integrate into jest as an expect extension?
It probes the function
f
with inputs of all kind of inputs:true, false, 0, "", undefined, null, [], {}
.I could imagine having a Fuzzer that can be created from given
f
and does not generate random values, but thosetestValues
.What do you think, does this make sense or is this out of scope for fuzzy testing?
The text was updated successfully, but these errors were encountered: