-
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
lab-remil #6
base: master
Are you sure you want to change the base?
lab-remil #6
Conversation
"quotes": [ "error", "single" ], | ||
"semi": ["error", "always"], | ||
"linebreak-style": [ "error", "windows" ], | ||
"comma-dangle": ["error", "always-multiline"] |
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.
YEAH TEAM COMMA DANGLE! WHOO!
@@ -0,0 +1,117 @@ | |||
# Created by https://www.gitignore.io/api/node,vim,osx,macos,linux | |||
|
|||
*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 work ignoring node modules.
@@ -0,0 +1 @@ | |||
All hail the redskins!!! |
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.
Nope.
@@ -0,0 +1 @@ | |||
The doppity doppest doptacular dopeness eva |
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.
Dope.
gulp.watch(['**/*.js', '!node_modules/**'], ['lint', 'test']); | ||
}); | ||
|
||
gulp.task('default', ['dev']); |
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 work setting your default gulp task to run all of your other gulp tasks.
return bufferObj.toString('hex', 0, 8); | ||
}; | ||
|
||
for(let i=0; i < files.length; i++) { |
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.
Typically you want a space around the = in your first for loop argument.
e.g. i = 0 is cleaner and a bit more "conventional".
if (resultArray.filter(function(file){ | ||
return Object.keys(file).includes('result'); | ||
}).length === files.length) { | ||
return callback(null, resultArray); |
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.
Perfect use of the callback here.
describe('FileLogger Module', function() { | ||
describe('with an improper file path', function(){ | ||
it('should return an error', function(done) { | ||
let badFilePath = 'badfile/sobad'; |
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. Sobad.
fileLogger(input , function(err, data) { | ||
expect(err).to.equal(null); | ||
expect(data).to.be.an('array'); | ||
expect(data.length).to.equal(input.length); |
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.
Cool. Yup, our output array's length should be the same. Good length.
}); | ||
}); | ||
}); | ||
}); |
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.
Lots of tests. Radical!
[x] For this assignment you will need to read three files and console log the first 8 bytes (in hex) of each file.
[x] Regardless of file size, all three files should be read and logged in the order 'one.txt', 'two.txt', 'three.txt'.
[x] You will need to include tests that guarantee that the files are logged in the proper order.
[x] You will also need to include tests that check for improper file paths.