Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jtwalters25
Copy link

No description provided.

index.js Outdated
'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