Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Add jest #62

Merged
merged 3 commits into from
Nov 2, 2017
Merged

Add jest #62

merged 3 commits into from
Nov 2, 2017

Conversation

timdeschryver
Copy link
Contributor

@timdeschryver timdeschryver commented Nov 2, 2017

Closes #61.
Also runs tests on pre-commit.

@coderplex-bot
Copy link
Collaborator

coderplex-bot commented Nov 2, 2017

Deploy preview ready!

Built with commit da90d27

https://deploy-preview-62--coderplex.netlify.com

package.json Outdated
},
"lint-staged": {
"*.js": [
"prettier --write --single-quote --print-width=80 --trailing-comma=all",
"xo",
"git add"
Copy link
Contributor

Choose a reason for hiding this comment

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

It would make sense to run xo and jest only for *.js file changes so can you move back xo and new jest to lint-staged options?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we add jest in lint-staged, the tests aren't being run.
To run the tests we are running the tests on precommit (see here).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I saw that, but why lint-staged can't run jest any reason?
I found this jestjs/jest#1678 so according to it we can pass jest --findRelatedTests to lint-staged to run tests for staged js files I think.

Copy link
Contributor

@vinaypuppal vinaypuppal left a comment

Choose a reason for hiding this comment

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

Hi thanks for the PR.
Can you fix above issue and add a .bablerc file as mentioned in next.js with-jest example here

@M-ZubairAhmed M-ZubairAhmed merged commit f442219 into coderplex-org:master Nov 2, 2017
@M-ZubairAhmed
Copy link

M-ZubairAhmed commented Nov 2, 2017

@tdeschryver thank you so much for your effort we really appreciate it .

If`you would like to support us in our mission please give us a star

@timdeschryver timdeschryver deleted the pr/jest branch November 2, 2017 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants