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
a5b955de
Commit
a5b955de
authored
Apr 06, 2020
by
Thomas Randolph
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for the new SET_DIFF_FILES mutation
parent
26127fbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
spec/frontend/diffs/store/mutations_spec.js
spec/frontend/diffs/store/mutations_spec.js
+18
-0
No files found.
spec/frontend/diffs/store/mutations_spec.js
View file @
a5b955de
...
...
@@ -51,6 +51,24 @@ describe('DiffsStoreMutations', () => {
});
});
describe
(
'
SET_DIFF_FILES
'
,
()
=>
{
it
(
'
should set diffFiles in state
'
,
()
=>
{
const
state
=
{};
mutations
[
types
.
SET_DIFF_FILES
](
state
,
[
'
file
'
,
'
another file
'
]);
expect
(
state
.
diffFiles
.
length
).
toEqual
(
2
);
});
it
(
'
should not set anything except diffFiles in state
'
,
()
=>
{
const
state
=
{};
mutations
[
types
.
SET_DIFF_FILES
](
state
,
[
'
file
'
,
'
another file
'
]);
expect
(
Object
.
keys
(
state
)).
toEqual
([
'
diffFiles
'
]);
});
});
describe
(
'
SET_DIFF_DATA
'
,
()
=>
{
it
(
'
should set diff data type properly
'
,
()
=>
{
const
state
=
{
...
...
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