Zachary Crumbo Assignment 3#5
Open
zcrumbo wants to merge 5 commits intocodefellows-javascript-401d13:masterfrom
Open
Zachary Crumbo Assignment 3#5zcrumbo wants to merge 5 commits intocodefellows-javascript-401d13:masterfrom
zcrumbo wants to merge 5 commits intocodefellows-javascript-401d13:masterfrom
Conversation
re-added package.json and eslint, which mysteriously disappeared
jalleng
reviewed
Feb 19, 2017
|
|
||
| fs.readFile(`${__dirname}/../data/${file1}`, function(err,data){ | ||
| if (err) return callback(err); | ||
|
|
There was a problem hiding this comment.
Probably don't need this white space here.
jalleng
reviewed
Feb 19, 2017
|
|
||
|
|
||
| module.exports = function(file1, file2, file3, callback){ | ||
|
|
There was a problem hiding this comment.
This function is set up well. I like that you are passing in your file names as parameters.
jalleng
reviewed
Feb 19, 2017
| module.exports = function(file1, file2, file3, callback){ | ||
|
|
||
| fs.readFile(`${__dirname}/../data/${file1}`, function(err,data){ | ||
| if (err) return callback(err); |
There was a problem hiding this comment.
Good job returning your error with the callback.
jalleng
reviewed
Feb 19, 2017
| if (err) return callback(err); | ||
| var third = data.toString('hex').substring(0,8); | ||
| resultsArray.push(third); | ||
| return callback(null, resultsArray); |
There was a problem hiding this comment.
Good job pushing your data into an array and passing back the array at the end. This takes care of the asynchronous nature of the file reads.
jalleng
reviewed
Feb 19, 2017
| expect(data[0]).to.equal(testData[0]); | ||
| expect(data[1]).to.equal(testData[1]); | ||
| expect(data[2]).to.equal(testData[2]); | ||
| done(); |
There was a problem hiding this comment.
Good job here. This verify's that they are in the correct order.
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.