Skip to content

Commit 2c53d62

Browse files
committed
lint
1 parent 61de2d8 commit 2c53d62

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/server/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ function getPage (array, page, perPage) {
4949
}
5050

5151
return obj
52-
}
52+
}

test/server/plural.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,19 +268,18 @@ describe('Server', function () {
268268

269269
describe('GET /:resource?_page=&_limit=', function () {
270270
it('should paginate with a custom limit', function (done) {
271+
var link = [
272+
'<http://localhost/list?_page=1&_limit=1>; rel="first"',
273+
'<http://localhost/list?_page=1&_limit=1>; rel="prev"',
274+
'<http://localhost/list?_page=3&_limit=1>; rel="next"',
275+
'<http://localhost/list?_page=15&_limit=1>; rel="last"'
276+
].join(', ')
271277
request(server)
272278
.get('/list?_page=2&_limit=1')
273279
.set('host', 'localhost')
274280
.expect('Content-Type', /json/)
275281
.expect('x-total-count', db.list.length.toString())
276-
.expect('link',
277-
[
278-
'<http://localhost/list?_page=1&_limit=1>; rel="first"',
279-
'<http://localhost/list?_page=1&_limit=1>; rel="prev"',
280-
'<http://localhost/list?_page=3&_limit=1>; rel="next"',
281-
'<http://localhost/list?_page=15&_limit=1>; rel="last"'
282-
].join(', ')
283-
)
282+
.expect('link', link)
284283
.expect('Access-Control-Expose-Headers', 'X-Total-Count')
285284
.expect(db.list.slice(1, 2))
286285
.expect(200, done)

0 commit comments

Comments
 (0)