-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create sequence for nosql id #1354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
29e47ba
to
80acca7
Compare
test/basic-querying.test.js
Outdated
users[0].name.should.equal('John Lennon'); | ||
users[1].name.should.equal('Paul McCartney'); | ||
var expectedNames = ['John Lennon', 'Paul McCartney']; | ||
expectedNames.indexOf(users[0].name).should.be.above(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we're checking the index is not -1... would it be should.not.equal(-1)
?
test/relations.test.js
Outdated
// mongodb returns `id` as an object | ||
idArr[0] = idArr[0].toString(); | ||
idArr[1] = idArr[1].toString(); | ||
idArr.indexOf(ch[0].id.toString()).should.be.above(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment.. if we're checking index should not be -1, perhaps better to use should.not.equal(-1)
.
@dhmlau thanks applied. |
b0ab6e3
to
c1e2095
Compare
c1e2095
to
23f1856
Compare
* create sequence for nosql id (#1354) (Janny) * Fix order of query results (Loay) * Add DateString type (Kevin Delisle) * datatype.test: use predefined date (Kevin Delisle) * Update api documents (Loay) * Datasource documentation tune-up (Kevin Delisle) * Added unit tests specific to DateType where null (#1349) (Andrew McDonnell) * Fix/geo null (#1334) (paulussup) * replace exception thrown for invalid dates (Diana Lau) * Revert PR #1326 (#1336) (Sakib Hasan) * Make lib peerDepend on loopback-connector (#1326) (Russ Tyndall) * Add test case using updateAttributes (Loay) * Fix forceId bug for updateOrCreate (Loay) * Fix typo in description (jannyHou) * Fix relations test case (loay)
Description
PR created when recovering test cases in cloudant:
cloudant creates string type id which could not guarantee id are incremented. To solve the problem, I add a
sequence
property to make sure the related test case returns result ordered by sequence and will skip the first data.Checklist
guide