Open
Conversation
cowchimp
reviewed
Oct 18, 2016
| } | ||
|
|
||
| function createError(errMsg) { | ||
| callback(new Error('Error while trying to call platform endpoint ' + endpoint + errMsg)); |
Collaborator
There was a problem hiding this comment.
need another space i think
cowchimp
reviewed
Oct 18, 2016
| var query = "dummy-query"; | ||
| var token = "dummy-token"; | ||
|
|
||
| it("WhenResponseReturnWithError_ShouldCallCallbackWithError", sinon.test(function() { |
Collaborator
There was a problem hiding this comment.
use spaces- more readable
cowchimp
reviewed
Oct 18, 2016
| var dummyErrorMessage = "dummy-error-message"; | ||
| var expectedError = new Error("Error while trying to call platform endpoint " + endpoint + " : " + dummyErrorMessage); | ||
|
|
||
| SetResponseWithError(this, dummyErrorMessage); |
cowchimp
reviewed
Oct 18, 2016
| proxy.callEndpoint(appId, appSecret, endpoint, query, token, callback); | ||
|
|
||
| sinon.assert.calledOnce(callback); | ||
| sinon.assert.calledWith(callback, sinon.match.same(null), sinon.match(expectedBody)); |
Collaborator
There was a problem hiding this comment.
to make it clearer that sinon.match.same(null) mean that errback was not called, consider putting it in a variable with a meaningful name
cowchimp
reviewed
Oct 18, 2016
| "devDependencies": {}, | ||
| "scripts": { | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| "test": "./node_modules/.bin/mocha test/mocha" |
Collaborator
There was a problem hiding this comment.
"test": "mocha test" should work.
might need to remove the mocha subfolder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.