Add browser specific docs for tests

This commit is contained in:
Stefan Feješ
2018-01-27 14:42:55 +01:00
parent 452fba43a1
commit c32ba1ba5f

View File

@ -45,6 +45,11 @@ Here's what you can do to help:
- Be sure to run `npm run test`. It is going to run all tests for all snippets.
- Make a new pull request **only if all the tests are passing**.
#### Browser specific tests
- If your snippet belongs to `browser` category then you will need to modify the tests to make them work.
- By default, `NodeJS` isn't browser environment. That said we have to use external package to help us simulate the browser for our tests.
- We use [jsdom](https://www.npmjs.com/package/jsdom) for our browser specific tests. You can find their [documentation](https://github.com/jsdom/jsdom) on GitHub as well.
### Additional guidelines and conventions regarding snippets