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

Add tests #154

Closed
1 of 5 tasks
KyleAMathews opened this issue Feb 26, 2016 · 4 comments
Closed
1 of 5 tasks

Add tests #154

KyleAMathews opened this issue Feb 26, 2016 · 4 comments
Labels
stale? Issue that may be closed soon due to the original author not responding any more.

Comments

@KyleAMathews
Copy link
Contributor

Tests are good.

Modules to unit test

  • glob-pages.js (which should be split into two modules, one for globbing and one for processing the files).
  • create-routes.js
  • gatsby-helpers.js

Integration tests

  • Can build starters (check for bundle.js, styles.css, html files?)
  • Running develop listens on port and correctly returns html/js
@KyleAMathews
Copy link
Contributor Author

benstepp added a commit to benstepp/gatsby that referenced this issue Apr 4, 2016
* Extracts the resolving of a page's path to it's own file for
testability.
* Adds `ava` as a development dependency to write and run tests.
* Adds ava related settings to inherit the babel config and run the
tests with npm test to package.json
* Refactor the quad-nested if statements in path resolving.

Working toward resolving Issue gatsbyjs#154
@benstepp
Copy link
Contributor

benstepp commented Apr 7, 2016

Any preference on other testing utilities? I wrote a single integration test with no real assertions, and came to the realization that we're probably going to need more stuff to get some really good coverage.

  • supertest? for http requests to development server
  • jsdom? to ensure pages are rendered with bundle/styles/other selectors
  • bluebird? promisify to reduce Promise boilerplate for async/await

I'm pretty new to JS testing land, so I'm not really sure what's the best/hottest to use.

@KyleAMathews
Copy link
Contributor Author

No strong preferences. Those are very common utilities so are great choices.

@jbolda jbolda added stale? Issue that may be closed soon due to the original author not responding any more. v0 labels Jun 5, 2017
@KyleAMathews
Copy link
Contributor Author

Closing as old and not very useful anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale? Issue that may be closed soon due to the original author not responding any more.
3 participants