Difference between test.before and top level code? #3150
Answered
by
novemberborn
enricoschaaf
asked this question in
Q&A
-
Hi 👋🏽 Is there a difference between writing code in a test.before block vs writing it top level using top level await? |
Beta Was this translation helpful? Give feedback.
Answered by
novemberborn
Jan 2, 2023
Replies: 1 comment
-
Not really, but you may get nicer error output if the code throws, plus if you're not using ESM you can do async stuff in the before hook. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
enricoschaaf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not really, but you may get nicer error output if the code throws, plus if you're not using ESM you can do async stuff in the before hook.