diff options
author | Rémy Coutable <remy@rymai.me> | 2017-04-10 15:23:26 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-10 16:40:33 +0200 |
commit | 2b606a3a2eb408c4c66a959f7efdfeeb76bb18e7 (patch) | |
tree | 828da5c87cef705cb24401fd42a3de3f7fc37f94 /doc/development/fe_guide/testing.md | |
parent | 0aafb6abb89b4b0fc4c033b21ccbfd1082b56b30 (diff) | |
download | gitlab-ce-2b606a3a2eb408c4c66a959f7efdfeeb76bb18e7.tar.gz |
Re-organize testing doc, and add RSpec structure doc
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'doc/development/fe_guide/testing.md')
-rw-r--r-- | doc/development/fe_guide/testing.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/development/fe_guide/testing.md b/doc/development/fe_guide/testing.md index 175873c9efa..a4631fd0073 100644 --- a/doc/development/fe_guide/testing.md +++ b/doc/development/fe_guide/testing.md @@ -13,10 +13,19 @@ for more information on general testing practices at GitLab. ## Karma test suite GitLab uses the [Karma][karma] test runner with [Jasmine][jasmine] as its test -framework for our JavaScript unit tests. For tests that rely on DOM +framework for our JavaScript unit tests. For tests that rely on DOM manipulation we use fixtures which are pre-compiled from HAML source files and served during testing by the [jasmine-jquery][jasmine-jquery] plugin. +JavaScript tests live in `spec/javascripts/`, matching the folder structure +of `app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js` +has a corresponding `spec/javascripts/behaviors/autosize_spec.js` file. + +Keep in mind that in a CI environment, these tests are run in a headless +browser and you will not have access to certain APIs, such as +[`Notification`](https://developer.mozilla.org/en-US/docs/Web/API/notification), +which will have to be stubbed. + ### Running frontend tests `rake karma` runs the frontend-only (JavaScript) tests. |