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

[baseline practices] Testing #157

Closed
rxmarbles opened this issue Feb 11, 2019 · 10 comments
Closed

[baseline practices] Testing #157

rxmarbles opened this issue Feb 11, 2019 · 10 comments
Assignees
Labels
pull request wanted Create a PR from the discussion

Comments

@rxmarbles
Copy link
Contributor

This is in continuation of #119 to keep the discussion focused on one part as we can further flesh out each piece to create a draft proposal around baseline practices.

Testing

  • Jest, Mocha
  • coverage should match most use cases for the module

If I am missing anything please add a comment and tag me so I can update

@ljharb
Copy link
Member

ljharb commented Feb 11, 2019

Also https://npmjs.com/tape, which is the only test runner I'm aware of that works on older nodes - my typical advice is to use jest or mocha for apps, and tape for packages, since packages should be supporting as old an engine as possible (#156).

@mcollina
Copy link
Member

mcollina commented Feb 11, 2019

I'm personally a huge fan of tap. I found that mocha tests tends to be brittle and flaky, because it runs all files within a single process. If cleanup is not done correctly, it will be really hard to prevent bad interactions between the tests.

Overall I do not think we should be expressing preferences here, as long as unit tests are present. We can highlight several nice patterns.

@mcollina mcollina added the package-maintenance-agenda Agenda items for package-maintenance team label Feb 11, 2019
@wesleytodd
Copy link
Member

Overall I do not think we should be expressing preferences here

Completely agree! I have had the opposite experience with Mocha, it has been more stable than other runners because of its single process methodology :). The take away from this is that we should be agnostic to technical implementation.

@rxmarbles
Copy link
Contributor Author

agree on not expressing preferences and the proposal should focus on the available testing frameworks/methodologies.

@mhdawson
Copy link
Member

I agree we should provide recommendations on "what" should be done, and then add information on options for "how" to do that.

@ahmadnassri
Copy link
Contributor

should start with a simple context of "Why", assuming lowest level of knowledge, starting with alignment on the value of testing, why it's needed, and what benefits it provides to both the package maintainer and the users.

@mhdawson mhdawson removed the package-maintenance-agenda Agenda items for package-maintenance team label Feb 25, 2019
@craftninja
Copy link
Contributor

craftninja commented Apr 22, 2019

From discussions in meeting April 22 #196

  • guidance around "how do I go from 0 to some testing"
  • "there should be something in a module's package so you run npm test and see output, very clear whether you pass or fail"

From PR comments:

@dominykas
Copy link
Member

Note to self: extend both - testing and ci/cd guidelines with additional info (and link to) the "Please test in LTS" blogpost (#260).

@boneskull
Copy link

A testing guidelines doc has been merged, written by @ghinks. Should this issue be closed?

@mhdawson
Copy link
Member

mhdawson commented Nov 9, 2020

closing

@mhdawson mhdawson closed this as completed Nov 9, 2020
Package Maintenance Roadmap automation moved this from To do to Done Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull request wanted Create a PR from the discussion
Development

No branches or pull requests

10 participants