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
4a22a97e
Commit
4a22a97e
authored
Apr 13, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added specs to stores allBlobs getter
parent
a35391c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
spec/javascripts/ide/stores/getters_spec.js
spec/javascripts/ide/stores/getters_spec.js
+20
-0
No files found.
spec/javascripts/ide/stores/getters_spec.js
View file @
4a22a97e
...
@@ -72,4 +72,24 @@ describe('IDE store getters', () => {
...
@@ -72,4 +72,24 @@ describe('IDE store getters', () => {
expect
(
getters
.
currentMergeRequest
(
localState
)).
toBeNull
();
expect
(
getters
.
currentMergeRequest
(
localState
)).
toBeNull
();
});
});
});
});
describe
(
'
allBlobs
'
,
()
=>
{
beforeEach
(()
=>
{
Object
.
assign
(
localState
.
entries
,
{
index
:
{
type
:
'
blob
'
,
name
:
'
index
'
,
lastOpenedAt
:
0
},
app
:
{
type
:
'
blob
'
,
name
:
'
blob
'
,
lastOpenedAt
:
0
},
folder
:
{
type
:
'
folder
'
,
name
:
'
folder
'
,
lastOpenedAt
:
0
},
});
});
it
(
'
returns only blobs
'
,
()
=>
{
expect
(
getters
.
allBlobs
(
localState
).
length
).
toBe
(
2
);
});
it
(
'
returns list sorted by lastOpenedAt
'
,
()
=>
{
localState
.
entries
.
app
.
lastOpenedAt
=
new
Date
().
getTime
();
expect
(
getters
.
allBlobs
(
localState
)[
0
].
name
).
toBe
(
'
blob
'
);
});
});
});
});
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