Skip to content

Issue #89 Call _brs_.resetMocks in between test files#90

Open
gerstej9 wants to merge 1 commit intohulu:mainfrom
gerstej9:JQuaglia_Call_brsResetMocks
Open

Issue #89 Call _brs_.resetMocks in between test files#90
gerstej9 wants to merge 1 commit intohulu:mainfrom
gerstej9:JQuaglia_Call_brsResetMocks

Conversation

@gerstej9
Copy link
Copy Markdown

Fix for issue #89 added _brs_resetMocks() function to TestRunner.ts file.

@lkipke lkipke requested review from alimnios72, lkipke and sjbarag April 19, 2021 18:53
Copy link
Copy Markdown
Contributor

@lkipke lkipke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Levi, on a side note we had some dependencies issues with npm7 and this change might break things

@sjbarag
Copy link
Copy Markdown
Contributor

sjbarag commented May 19, 2025

(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! 👋)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants