Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Commit

Permalink
Add test for sorting with strings (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Sep 28, 2016
1 parent 3f6cc20 commit 0e63d0b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/common-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@ function common(app, errors, serviceName = 'people', idProp = 'id') {
});
});

it('can $sort with strings', () => {
const params = {
query: {
$sort: { name: '1' }
}
};

return app.service(serviceName).find(params).then(data => {
expect(data.length).to.equal(3);
expect(data[0].name).to.equal('Alice');
expect(data[1].name).to.equal('Bob');
expect(data[2].name).to.equal('Doug');
});
});

it('can $limit', () => {
const params = {
query: {
Expand Down

0 comments on commit 0e63d0b

Please sign in to comment.