Skip to content

All done. Please merge.#13

Open
dataluxe wants to merge 6 commits into
codefellows-seattle-javascript-401d19:masterfrom
dataluxe:master
Open

All done. Please merge.#13
dataluxe wants to merge 6 commits into
codefellows-seattle-javascript-401d19:masterfrom
dataluxe:master

Conversation

@dataluxe
Copy link
Copy Markdown

No description provided.

Comment thread lab-phelan/lib/reader.js
paths = paths.map(x=>{return{'path':x, 'text':null};});
// Map file array out into Object Array - each object has 'path' and 'text'. <text> defaults to null, <path> is the inputted path from the original array.

for (let i=0, len=paths.length; i<len; i++) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need space between your operators

Comment thread lab-phelan/lib/reader.js

for (let i=0, len=paths.length; i<len; i++) {

//console.log(`Main 'for' loop started - ${new Date().getTime()}`);//REMOVE-------
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

always delete commented out code and unnecessary console.logs

Comment thread lab-phelan/lib/reader.js

fs.readFile(paths[i].path, (error, data) => {

//console.log(`readFile callback's 'this': ${this}`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corpse

Comment thread lab-phelan/lib/reader.js
return; //First of two exit points for this function - remember, this function should return <undefined>, as this expression will.
}

//console.log(`File ${i} succesfully read! Characters returned: ${data.length}`);//REMOVE-------
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corpse

Comment thread lab-phelan/lib/reader.js
//console.log(`paths[${i}].text - ${paths[i].text}`);
//console.log(`paths: ${paths}`);

if (paths.filter(x=>{return x.text===null;}).length === 0) callback(null, paths.map(x=>{return x.text;}));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for readability purposes you should separate these onto different lines and add spaces between operators.

).toThrow();
});

test(`- : "<paths> is not populated with strings."`, () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is the same as line 45

});
});

test(`- : "<paths> is not populated with strings."`, () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should change this test message, you already have a test message that is exactly the same as this.

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