-
Notifications
You must be signed in to change notification settings - Fork 106
fix(tests): split running remote and local tests #2623
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ const MOCHA_BIN = path.join(path.dirname(__dirname), 'node_modules', '.bin', 'mo | |
| const NYC_BIN = path.join(path.dirname(__dirname), 'node_modules', '.bin', 'nyc') | ||
|
|
||
| let bin = NYC_BIN | ||
| let argv = ['--cache', MOCHA_BIN] | ||
| let argv = ['--cache', '--no-clean', MOCHA_BIN] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this do? (purely for my own curiosity, again)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
|
|
||
| if (process.env.NO_COVERAGE) { | ||
| bin = MOCHA_BIN | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -683,15 +683,13 @@ describe('remote db', function() { | |
| .then(function(passwordForgotToken) { | ||
| return db.forgotPasswordVerified(passwordForgotToken) | ||
| .then(accountResetToken => { | ||
| assert.ok(accountResetToken.createdAt > passwordForgotToken.createdAt, 'account reset token should be newer than password forgot token') | ||
| assert.ok(accountResetToken.createdAt >= passwordForgotToken.createdAt, 'account reset token should be equal or newer than password forgot token') | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes #2534 (comment), where I think the reset token has the same timestamp as forgot token since it gets create right next to each other. I could have added a delay here but opted to just test that they were >= since a they could have same timestamp. |
||
| return accountResetToken | ||
| }) | ||
| }) | ||
| .then(function(accountResetToken) { | ||
| assert.deepEqual(accountResetToken.uid, account.uid, 'account reset token uid should be the same as the account.uid') | ||
| tokenId = accountResetToken.id | ||
| }) | ||
| .then(function() { | ||
| return db.accountResetToken(tokenId) | ||
| }) | ||
| .then(function(accountResetToken) { | ||
|
|
@@ -702,15 +700,13 @@ describe('remote db', function() { | |
| .then(function(accountResetToken) { | ||
| return db.deleteAccountResetToken(accountResetToken) | ||
| }) | ||
| .then(function() { | ||
| .then(function () { | ||
| return db.accountResetToken(tokenId) | ||
| }) | ||
| .then(function(accountResetToken) { | ||
| assert(false, 'The above accountResetToken() call should fail, since the accountResetToken has been deleted') | ||
| }, function(err) { | ||
| assert.equal(err.errno, 110, 'accountResetToken() fails with the correct error code') | ||
| var msg = 'Error: The authentication token could not be found' | ||
| assert.equal(msg, '' + err, 'accountResetToken() fails with the correct message') | ||
| .then(assert.fail, function (err) { | ||
| assert.equal(err.errno, 110, 'accountResetToken() fails with the correct error code') | ||
| var msg = 'Error: The authentication token could not be found' | ||
| assert.equal(msg, '' + err, 'accountResetToken() fails with the correct message') | ||
| }) | ||
| }) | ||
| } | ||
| ) | ||
|
|
||
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.
Purely for my own curiosity, are there any cool new features/fixes we're getting with this upgrade or is it just to get us on the latest and greatest generally?
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 believe this upgrade just had bug fixes. I thought they might resolve some of the flaky test but didn't.