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

Test suite #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

mattjgalloway
Copy link
Contributor

This PR adds a simple test suite that can then be run with npm test (after an npm install).

The tests here will use cached HTTP responses, and you can change to record = true in the test to save the HTTP responses.

This is so that tests will be able to be set up correctly. When using `clasp` now need to set root dir to `src`.
This adds some tests that function by recording from fetching directly from the web, but then caches the return files so that when the tests are run next time, they simply use the cached HTTP responses. This allows us to mock the web service to avoid tests starting to fail on changes to the web responses. It would be nice to also have a suite that tests those and those will come later.

Whether or not HTTP responses are saved or not is controlled by the `record` flag at the top of the tests.
@bypepe77
Copy link

@joseballester This should be merge for consistency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants