-
Notifications
You must be signed in to change notification settings - Fork 17
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
Lab3 corrections made #17
base: master
Are you sure you want to change the base?
Lab3 corrections made #17
Conversation
index.js
Outdated
'use strict'; | ||
|
||
const fileReader = require('./lib/file-reader.js'); | ||
|
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.
Hey Jeremiah. Is this file 'file-reader.js' in your repo? I am not seeing it and It is throwing an error in my console.
|
||
const readFileHelper = module.exports = function(pathArray, callback) { | ||
var result = []; | ||
|
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 like that you are passing in the file paths as an array.
var result = []; | ||
|
||
fs.readFile(pathArray[0], function(err, data) { | ||
if (err) return callback(err); |
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.
Good Job returning the error with the callback.
expect(data[2]).to.equal(expectedResult[2]); | ||
console.log('data', data); | ||
done(); | ||
}); |
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.
This is a good test. It will make sure that your files are coming back in the correct order.
No description provided.