Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
(Med.)[BFF-403] Add "Go to location" option to FileAccessContextMenu #426
base: main
Are you sure you want to change the base?
(Med.)[BFF-403] Add "Go to location" option to FileAccessContextMenu #426
Changes from 5 commits
7d0a2ce
2f99b89
0b8c222
866d43b
31bcebc
7953e38
8c20038
bd1aa5c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SeanLeRoy @aswallace Help! This unit test doesn't actually work the way it looks like it should. It's currently failing on the GitHub build but passing on my local machine (for the wrong reasons).
The issue with it is that the
stub()
I'm using doesn't really stub what it looks like it should. You can flip the.returns()
value all you want and it doesn't cause the test to fail or pass.Does anyone have better experience with / advice for using Sinon and mocking out module functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be the way that sinon is running against the other tests - so I'd try the sinon changes I suggested in other comments.
it might also be that the way
fs
is imported in this and in the actual usage is different so perhaps try unifying themThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked at the branch locally, agree that it's an issue with the way
fs
is imported.I was able to get the test to pass/fail by changing the
fs
import in this file toimport fs from "fs";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you two. The issue did turn out to be the import, and changing the stub to use the sandbox did simplify the test.
I can get the test to pass / fail depending on what I have
existsSync
return now, but unfortunately the unit test is still failing in the GitHub build 😢 . Haven't figured out why yet.