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
7d69c8e5
Commit
7d69c8e5
authored
Apr 25, 2020
by
Jackie Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate ee performance_issue_body_spec to Jest
parent
b6cce188
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
ee/spec/frontend/vue_mr_widget/components/performance_issue_body_spec.js
...d/vue_mr_widget/components/performance_issue_body_spec.js
+14
-14
No files found.
ee/spec/
javascripts
/vue_mr_widget/components/performance_issue_body_spec.js
→
ee/spec/
frontend
/vue_mr_widget/components/performance_issue_body_spec.js
View file @
7d69c8e5
import
Vue
from
'
vue
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
component
from
'
ee/vue_merge_request_widget/components/performance_issue_body.vue
'
;
import
component
from
'
ee/vue_merge_request_widget/components/performance_issue_body.vue
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
describe
(
'
performance issue body
'
,
()
=>
{
describe
(
'
performance issue body
'
,
()
=>
{
let
vm
;
let
wrapper
;
const
Component
=
Vue
.
extend
(
component
);
const
performanceIssue
=
{
const
performanceIssue
=
{
delta
:
0.1999999999998181
,
delta
:
0.1999999999998181
,
...
@@ -14,25 +11,28 @@ describe('performance issue body', () => {
...
@@ -14,25 +11,28 @@ describe('performance issue body', () => {
score
:
4974.8
,
score
:
4974.8
,
};
};
afterEach
(()
=>
{
vm
.
$destroy
();
});
beforeEach
(()
=>
{
beforeEach
(()
=>
{
vm
=
mountComponent
(
Component
,
{
wrapper
=
shallowMount
(
component
,
{
issue
:
performanceIssue
,
propsData
:
{
issue
:
performanceIssue
,
},
});
});
});
});
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
=
null
;
});
it
(
'
renders issue name
'
,
()
=>
{
it
(
'
renders issue name
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
performanceIssue
.
name
);
expect
(
wrapper
.
text
()).
toContain
(
performanceIssue
.
name
);
});
});
it
(
'
renders issue score formatted
'
,
()
=>
{
it
(
'
renders issue score formatted
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
'
4974.80
'
);
expect
(
wrapper
.
text
()).
toContain
(
'
4974.80
'
);
});
});
it
(
'
renders issue delta formatted
'
,
()
=>
{
it
(
'
renders issue delta formatted
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
.
trim
()).
toContain
(
'
(+0.20)
'
);
expect
(
wrapper
.
text
()).
toContain
(
'
(+0.20)
'
);
});
});
});
});
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