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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
221fa387
Commit
221fa387
authored
Mar 04, 2021
by
Justin Boyson
Committed by
Amy Qualls
Mar 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Consolidate duplicate info re: testing components
parent
4e9466ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
doc/development/fe_guide/vue.md
doc/development/fe_guide/vue.md
+3
-5
No files found.
doc/development/fe_guide/vue.md
View file @
221fa387
...
...
@@ -237,6 +237,9 @@ Each Vue component has a unique output. This output is always present in the ren
Although each method of a Vue component can be tested individually, our goal is to test the output
of the render function, which represents the state at all times.
Visit the
[
Vue testing guide
](
https://vuejs.org/v2/guide/testing.html#Unit-Testing
)
for help
testing the rendered output.
Here's an example of a well structured unit test for
[
this Vue component
](
#appendix---vue-component-subject-under-test
)
:
```
javascript
...
...
@@ -331,11 +334,6 @@ describe('~/todos/app.vue', () => {
});
```
### Test the component's output
The main return value of a Vue component is the rendered output. In order to test the component we
need to test the rendered output. Visit the
[
Vue testing guide
](
https://vuejs.org/v2/guide/testing.html#Unit-Testing
)
.
### Child components
1.
Test any directive that defines if/how child component is rendered (for example,
`v-if`
and
`v-for`
).
...
...
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