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
Boxiang Sun
gitlab-ce
Commits
06455d2f
Commit
06455d2f
authored
May 05, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] add documentation
parent
0d540530
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
doc/development/fe_guide/testing.md
doc/development/fe_guide/testing.md
+27
-0
No files found.
doc/development/fe_guide/testing.md
View file @
06455d2f
...
...
@@ -29,6 +29,33 @@ browser and you will not have access to certain APIs, such as
which will have to be stubbed.
### Writing tests
When writing describe test blocks to test specific functions/methods,
please use the method name as the describe block name.
```
javascript
// Good
describe
(
'
methodName
'
,
()
=>
{
it
(
'
passes
'
,
()
=>
{
expect
(
true
).
toEqual
(
true
);
});
});
// Bad
describe
(
'
#methodName
'
,
()
=>
{
it
(
'
passes
'
,
()
=>
{
expect
(
true
).
toEqual
(
true
);
});
});
// Bad
describe
(
'
.methodName
'
,
()
=>
{
it
(
'
passes
'
,
()
=>
{
expect
(
true
).
toEqual
(
true
);
});
});
```
### Vue.js unit tests
See this
[
section
][
vue-test
]
.
...
...
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