-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: testEnvironmentOptions
documentation/types are wrong
#11900
Comments
The There are other similar options which take JSON string as an argument: Looking at the whole picture, I think it would be better to improve the |
i think either this needs to also be changed to |
Your expectation is correct - it should be passed through (note that
We haven't been thorough enough when documenting all options - it should be there 🙂 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Version
27.2.2
Steps to reproduce
jest -h
string
--testEnvironmentOptions
, assuming it getsJSON.parse
d into aRecord
:Expected behavior
if the type passed in the cli is
string
but the type in ts isRecord<string, unknown>
, i'd expect it to parse the JSON into aRecord
or something. therefore, theconsole.log
from the custom environment's constructor outputs"object"
Actual behavior
the
console.log
from the custom environment's constructor outputs"string"
Additional context
testEnvironmentOptions
isn't even present here. are you even supposed to be able to pass it in the command line?Environment
The text was updated successfully, but these errors were encountered: