Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
2b606a3a
Commit
2b606a3a
authored
Apr 10, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-organize testing doc, and add RSpec structure doc
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
0aafb6ab
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
165 additions
and
89 deletions
+165
-89
doc/development/fe_guide/testing.md
doc/development/fe_guide/testing.md
+10
-1
doc/development/testing.md
doc/development/testing.md
+155
-88
No files found.
doc/development/fe_guide/testing.md
View file @
2b606a3a
...
@@ -13,10 +13,19 @@ for more information on general testing practices at GitLab.
...
@@ -13,10 +13,19 @@ for more information on general testing practices at GitLab.
## Karma test suite
## Karma test suite
GitLab uses the
[
Karma
][
karma
]
test runner with
[
Jasmine
][
jasmine
]
as its test
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
manipulation we use fixtures which are pre-compiled from HAML source files and
served during testing by the
[
jasmine-jquery
][
jasmine-jquery
]
plugin.
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
### Running frontend tests
`rake karma`
runs the frontend-only (JavaScript) tests.
`rake karma`
runs the frontend-only (JavaScript) tests.
...
...
doc/development/testing.md
View file @
2b606a3a
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment