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

docs: Add example of generating tests with a HOF #4494

Merged
merged 5 commits into from
Feb 5, 2021

Conversation

maxwellgerber
Copy link
Contributor

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions.

Description of the Change

Quick docs update showing a workaround with some common issues run into w/data-driven tests.

Namely, it's very hard to run a single testcase from an IDE because tests inside a .forEach callback aren't detected, Compare
image
with
image

Alternate Designs

N/A (docs update)

Why should this be in core?

N/A (docs update)

Benefits

This approach has been useful for me & my team - hope it can be useful for someone else too

Possible Drawbacks

Slightly more verbose than pure data-driven approach.

Applicable issues

@jsf-clabot
Copy link

jsf-clabot commented Nov 2, 2020

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

coveralls commented Nov 2, 2020

Coverage Status

Coverage remained the same at 94.129% when pulling a5cccfe on maxwellgerber:patch-1 into 9122909 on mochajs:master.

@boneskull boneskull added area: documentation anything involving docs or mochajs.org semver-patch implementation requires increase of "patch" version number; "bug fixes" labels Nov 2, 2020
Copy link
Contributor

@boneskull boneskull left a comment

Choose a reason for hiding this comment

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

Thanks! Good addition. I have a couple suggestions--happy to discuss.

docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
@boneskull
Copy link
Contributor

yeah that coveralls failure doesn't make sense. we've had this problem before. unclear to me if the culprit is coveralls or nyc...

Copy link
Contributor

@boneskull boneskull left a comment

Choose a reason for hiding this comment

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

thanks for the updates. I have some more suggestions

docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
@boneskull
Copy link
Contributor

Test failure looks like timing-related flake; unrelated

Copy link
Contributor

@boneskull boneskull left a comment

Choose a reason for hiding this comment

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

missed one

docs/index.md Outdated Show resolved Hide resolved
Copy link
Contributor

@juergba juergba left a comment

Choose a reason for hiding this comment

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

@maxwellgerber thank you
The cancelled browser test is off-topic.

This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org semver-patch implementation requires increase of "patch" version number; "bug fixes"
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants