Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gerstej9
Copy link

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

@lkipke lkipke requested review from lkipke, sjbarag and alimnios72 April 19, 2021 18:53
Copy link
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 🙂

@@ -38,6 +38,8 @@ export class TestRunner {
testFiles: string[]
) {
testFiles.forEach((filename, index) => {
// Don't allow test files to pollute each other
_brs_.resetMocks();
Copy link
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
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
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

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.

3 participants