Replies: 2 comments
-
You can attach custom data to tasks: https://vitest.dev/advanced/metadata.html |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you this seems like the way, that will achieve, what I need, it is still not perfect, as it happens on every suite, and I can't pass functions (which I don't necessarily need now, but might). And looking at passing data through afterEach - wont that break if users have their own forEach? Now this got me thinking that maybe best approach would be to make config for reporter be actually skeleton reporter implementation that handles the real reporter's setup. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I add a setup file to setupFiles filed I can use globalThis to pass things like config into custom matchers for instance, and same data is accessible in test files as well.
Now I need to have these data also available in custom reporter, globalThis data defined in setup file however is not defined within Reporter, is there any way to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions