Issue #89 Call _brs_.resetMocks in between test files#90
Issue #89 Call _brs_.resetMocks in between test files#90
Conversation
lkipke
left a comment
There was a problem hiding this comment.
Unfortunately, I think we may need brs changes as well to facilitate this. Also, let's add test cases in this repo once it's working 🙂
| ) { | ||
| testFiles.forEach((filename, index) => { | ||
| // Don't allow test files to pollute each other | ||
| _brs_.resetMocks(); |
There was a problem hiding this comment.
I don't think this will quite work -- _brs_ is only defined in Brightscript files, not Typescript, which is why we have compilation errors from Github Actions. I think we'll probably have to expose resetMocks as an export in the brs project, then call it from here.
| @@ -1,8 +1,12252 @@ | |||
| { | |||
| "name": "@hulu/roca", | |||
| "version": "0.21.0", | |||
| "lockfileVersion": 1, | |||
There was a problem hiding this comment.
Careful, we don't want to upgrade our lockfile version as part of this PR. We could do it separately (or better yet, switch to Yarn), but we should keep it as-is for this PR.
There was a problem hiding this comment.
Agree with Levi, on a side note we had some dependencies issues with npm7 and this change might break things
|
(Cleaning up my github notifications) It's probably worth closing this. I'm not sure if it's still relevant after four years 😬 (also hi @lkipke! hi @alimnios72! 👋) |
Fix for issue #89 added
_brs_resetMocks()function toTestRunner.tsfile.