Closed MVEMCJSUNPE closed 4 years ago
looking into this right now. seems like a bug, but we have tests that ensure the value of whatever is in beforeAll doesn't change. however it could be that our tests are incorrectly reporting.
confirmed. this is a bug.
Summary
Maybe I just don't understand the functionality of Rhum.beforeAll because I'm stupid, but it seems that the the function input into Rhum.beforeAll gets executed for every test case instead of just once before all testcases. If this really is how Rhum.beforeOnly, then I would like for this to be changed to having the function that is input into Rhum.beforeAll be executed once before all test cases, as this is the convention of most other Javascript/Typescript testing frameworks. beforeAll vs beforeEach
Steps To Reproduce The Bug
Consider the following typescript file:
If we run the command
deno test --allow-env blah.ts
, how many times does the function input into Rhum.beforeAll get executed?Expected Behavior
I would like the function input into Rhum.beforeAll to be executed ONE time before all test cases, not once for every test case.