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

Establish guidelines for writing Jest tests #213

Closed
Silvyre opened this issue Nov 15, 2019 · 5 comments
Closed

Establish guidelines for writing Jest tests #213

Silvyre opened this issue Nov 15, 2019 · 5 comments
Assignees
Labels
developer experience Helping the Developer Experience help wanted Extra attention is needed type: documentation (docs) Improvements or additions to documentation type: nice to have Feature that'd be nice to have, but not a priority type: test Creation and development of test

Comments

@Silvyre
Copy link
Contributor

Silvyre commented Nov 15, 2019

Presently, across all merged and pending test files, an assortment of testing syntax is used, and few structural similarities exist. For example, some testing files use describe(), while others do not; some tests use test(), while others use its alias it(), etc.

I feel that it would be helpful to Telescope's future maintainers if we established and started abiding by some common conventions or guidelines for writing test files. This would first require us to determine our preferred coding style for test files, including which pieces of Jest syntax each testing file should or should not utilize.

@Silvyre Silvyre added type: documentation (docs) Improvements or additions to documentation help wanted Extra attention is needed type: discussion Requires conversation type: test Creation and development of test labels Nov 15, 2019
@miggs125
Copy link
Contributor

This is a great idea!. We should do this in the CONTRIBUTING file

@humphd
Copy link
Contributor

humphd commented Nov 16, 2019

See #245, which has some excellent sample code for doing mock network requests in tests.

@humphd
Copy link
Contributor

humphd commented Nov 16, 2019

cc @manekenpix, who has written a bunch of our test code.

@humphd humphd added the developer experience Helping the Developer Experience label Nov 17, 2019
@humphd
Copy link
Contributor

humphd commented Nov 20, 2019

https://devhints.io/jest is really useful, we should link to it somehow in our docs.

@drwm-base drwm-base self-assigned this Nov 30, 2019
@agarcia-caicedo agarcia-caicedo added type: nice to have Feature that'd be nice to have, but not a priority and removed type: discussion Requires conversation labels Jan 13, 2020
@lozinska lozinska assigned Silvyre, c3ho and drwm-base and unassigned drwm-base Jan 27, 2020
@c3ho
Copy link
Contributor

c3ho commented Mar 2, 2020

Closing this issue as it is too vague.

@c3ho c3ho closed this as completed Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Helping the Developer Experience help wanted Extra attention is needed type: documentation (docs) Improvements or additions to documentation type: nice to have Feature that'd be nice to have, but not a priority type: test Creation and development of test
Projects
None yet
Development

No branches or pull requests

7 participants