BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
fe2e8dba
Unverified
Commit
fe2e8dba
authored
Feb 01, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed infinite loop crashing tests
parent
4cea24f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
pager_spec.js
spec/javascripts/pager_spec.js
+13
-8
No files found.
spec/javascripts/pager_spec.js
View file @
fe2e8dba
...
...
@@ -47,12 +47,12 @@ describe('pager', () => {
});
describe
(
'getOld'
,
()
=>
{
const
urlRegex
=
/
\/
some_list
(
.*
)
$/
;
const
urlRegex
=
/
(
.*
)
some_list
(
.*
)
$/
;
let
mock
;
function
mockSuccess
()
{
mock
.
onGet
(
urlRegex
).
reply
(
200
,
{
count
:
2
0
,
count
:
0
,
html
:
''
,
});
}
...
...
@@ -65,9 +65,9 @@ describe('pager', () => {
setFixtures
(
'<div class="content_list" data-href="/some_list"></div><div class="loading"></div>'
);
spyOn
(
axios
,
'get'
).
and
.
callThrough
();
Pager
.
init
();
mock
=
new
MockAdapter
(
axios
);
Pager
.
init
();
});
afterEach
(()
=>
{
...
...
@@ -119,10 +119,15 @@ describe('pager', () => {
Pager
.
getOld
();
setTimeout
(()
=>
{
const
[
url
,
params
]
=
$
.
ajax
.
calls
.
argsFor
(
0
);
console
.
log
(
url
,
params
);
// expect(data).toBe('limit=20&offset=100');
// expect(url).toBe('/some_list');
const
[
url
,
params
]
=
axios
.
get
.
calls
.
argsFor
(
0
);
expect
(
params
).
toEqual
({
params
:
{
limit
:
20
,
offset
:
100
,
},
});
expect
(
url
).
toBe
(
'/some_list'
);
done
();
});
...
...
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