Figure out how to run inline tests
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 379
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 6
Description
I *think* that Jest is breaking my changes to global between test runs, not a problem in vm2 (I think it uses eval) but when creating a new module and compiling it `global` is reset.
This is less of an issue in danger, but much more of an issue in Peril.
Perhaps in tests we could not edit globals and use `jest.mock` on a "danger" import?
Contributor guide
Research direction
Start by reproducing the inline-test behavior described with Jest, a newly compiled vm2 module, and changes to global, comparing Danger and Peril contexts. Trace how the test setup creates modules and isolates globals; done means the behavior is understood and the issue has a concrete, reproducible resolution for test isolation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100