From 22522be3e072568f466a60235798a6af607f877d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Sat, 27 Jan 2018 14:42:55 +0100 Subject: [PATCH 1/3] Add browser specific docs for tests --- CONTRIBUTING.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc5760ff8..7721a3434 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 From edf2a73ff6c92e1ede84e58e9f4ffe36c538786a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Sat, 27 Jan 2018 15:02:51 +0100 Subject: [PATCH 2/3] fix spacing --- CONTRIBUTING.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7721a3434..27e1a819e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,11 +47,9 @@ Here's what you can do to help: #### 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. +- By default, `Node.js` 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 - When describing snippets, refer to methods, using their full name. For example, use `Array.reduce()`, instead of `reduce()`. From 7f885abed645fcd684eabf74ff6dcd27b99cc26d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Sat, 27 Jan 2018 15:04:34 +0100 Subject: [PATCH 3/3] fix typos --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 27e1a819e..026cf9b05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,8 +46,8 @@ Here's what you can do to help: - 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, `Node.js` isn't browser environment. That said we have to use external package to help us simulate the browser for our tests. +- If your snippet belongs to `browser` category, then you will need to modify the tests to make them work. +- By default, `Node.js` isn't browser environment. That said we have to use an 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