-
Notifications
You must be signed in to change notification settings - Fork 15
file process #1
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
base: master
Are you sure you want to change the base?
file process #1
Conversation
"indent": [ "error", 2 ], | ||
"quotes": [ "error", "single" ], | ||
"semi": ["error", "always"], | ||
"linebreak-style": [ "error", "unix" ] |
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.
No comma dangle. :p Boo.
@@ -0,0 +1,127 @@ | |||
# Created by https://www.gitignore.io/api/node,vim,macos,linux,windows | |||
|
|||
node_modules/ |
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.
Nice job ignoring node_modules.
@@ -0,0 +1 @@ | |||
The words in the one file |
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 SHOULD output different buffers when you read these, but it could be a problem that all 3 of your txt files have the same first 16 characters.
|
||
const fs = require('fs'); | ||
|
||
const readFile = module.exports = function(file, callback) { |
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.
Your function needs to be able to take in all 3 files at once and read them asynchronously.
Currently, this function can only take a single file and read it.
|
||
describe('inproper file path', function(){ | ||
it('should return an error', function(done) { | ||
readFile(`${__dirname}/fake-file.txt`, function(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 test for a bad filepath.
}); | ||
}); | ||
}); | ||
|
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.
Need a test to be able to read all 3 files asynchronously and return a value only if all 3 work successfully.
Currently, you do not have the logic for reading all 3 within one function call, which is an assignment requirement.
No description provided.