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

Remove more global variables from tests. #11017

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

eviltrout
Copy link
Contributor

  • Use sinon instead of sandbox and require an import.
  • You need to import currentURL to use it.

@@ -117,22 +118,22 @@ Object.keys(functionBindings).forEach((func) => {
});

test("selectDown calls _moveSelection with 1", (assert) => {
var stub = sandbox.stub(KeyboardShortcuts, "_moveSelection");
var stub = sinon.stub(KeyboardShortcuts, "_moveSelection");
Copy link
Contributor

Choose a reason for hiding this comment

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

I see you replaced var with let in other files in this PR but not those in this one. (except a single instance at the top)

Do you want to update this PR or do a second one that updates all vars across all tests?

* Use `sinon` instead of `sandbox` and require an import.
* You need to import `currentURL` to use it.
@eviltrout
Copy link
Contributor Author

@CvX yes I probably should have changed those while I was in there. I've pushed an update that changes them to let

@eviltrout eviltrout merged commit 1e4c0d1 into master Oct 26, 2020
@eviltrout eviltrout deleted the more-test-globals branch October 26, 2020 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants