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

test/integration: allow use of this.timeout() in all tests #1413

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Feb 19, 2025

Follow-up to #1402
Noticed while investigating #1403

Due to use of function() in the test wrappers, this was unbound from the real test functions. This PR re-binds mocha's this to the test functions, allowing use of e.g. this.timeout(...) in individual tests.

What has been done to verify that this works as intended?

Checked all the tests still pass.

Why is this the best possible solution? Were any other approaches considered?

No.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

No effect - it's test code only.

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

No.

Before submitting this PR, please make sure you have:

  • run make test and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

alxndrsn and others added 2 commits February 19, 2025 08:13
Follow-up to getodk#1402
Noticed while investigating getodk#1403

Due to use of `function()` in the test wrappers, `this` was unbound from the real test functions.  This PR re-binds mocha's `this` to the test functions, allowing use of e.g. `this.timeout(...)` in individual tests.
@alxndrsn alxndrsn marked this pull request as ready for review February 19, 2025 08:37
@alxndrsn alxndrsn merged commit ac74cc5 into getodk:master Feb 20, 2025
6 checks passed
@alxndrsn alxndrsn deleted the allow-test-timeouts branch February 20, 2025 06:10
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.

2 participants