Skip to content
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

.when() context is inconsistent #2198

Open
DaddyWarbucks opened this issue Apr 10, 2024 · 0 comments
Open

.when() context is inconsistent #2198

DaddyWarbucks opened this issue Apr 10, 2024 · 0 comments

Comments

@DaddyWarbucks
Copy link
Contributor

Describe the bug
When using the third argument of .when() (aka testContext), the transform does not run as expected. Specifically I am trying to use the testContext.index of an array schema to access items retrieved from the when.

To Reproduce
I cannot, to save my life, figure out how to open the test panel on Codesandbox. I also was pulling my hair out because Codesandbox was running the code twice and this error is so weird in general. Instead I used StackBlitz. To access the console, inspect the page and it will bring up a separate Chrome DevTools (not embedded like Codesandbox).

https://stackblitz.com/edit/vitejs-vite-r7lfvf?file=main.js

Switch between commenting lines 11 and 14. Although both of these lines of code should do the exact same thing, line 11 does not work.

Expected behavior
I can use the testContext.index to retrieve things from context.

Platform (please complete the following information):

  • Browser: Chrome
  • Version: 1.4

Additional context
I am happy to work on this and can open a PR. But I am unclear on where to even start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant