Skip to content

Lab3 corrections made#17

Open
jtwalters25 wants to merge 3 commits intocodefellows-javascript-401d13:masterfrom
jtwalters25:lab3
Open

Lab3 corrections made#17
jtwalters25 wants to merge 3 commits intocodefellows-javascript-401d13:masterfrom
jtwalters25:lab3

Conversation

@jtwalters25
Copy link

No description provided.

'use strict';

const fileReader = require('./lib/file-reader.js');

Copy link

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 = [];

Copy link

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);
Copy link

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();
});
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants