Conversation
| var dataNum = []; | ||
|
|
||
| fs.readFile(pathArray[0], function(err, data) { | ||
| if (err) callback(err); |
There was a problem hiding this comment.
Good job calling the callback with the err.
| @@ -0,0 +1 @@ | |||
| Hello this is test two | |||
There was a problem hiding this comment.
The first 8 bytes of your test files are all the same. Each one needs to be different in order for you to tell if they are logging out in the order that you are looking for.
|
|
||
| const gulp = require('gulp'); | ||
| const eslint = require('gulp-eslint'); | ||
| const mocha = require('gulp-mocha'); |
There was a problem hiding this comment.
You are requiring gulp-mocha here but it is not in your package.json. Make sure that you save it as a devDependency.
| fileReader(`${__dirname}/./data/two.txt`, function(err, data) { | ||
| if (err) throw err; | ||
| console.log('three:', data.toString('hex', 0, 8)); | ||
| }); |
There was a problem hiding this comment.
Your index should just call the function that you set up in file-reader.js one time and hand it a callback. So you can run 'node index.js in the terminal and see it output the three files in order.
| console.log(dataNum); | ||
| callback(null, dataNum); | ||
|
|
||
| }); |
There was a problem hiding this comment.
Great job with this. I like that your function takes an array of file names as a parameter.
| done(); | ||
| }); | ||
| it('should have correct order of hex strings', (done) => { | ||
| var dataNum = ['48656c6c6f207468', '48656c6c6f207468', '48656c6c6f207468']; |
There was a problem hiding this comment.
These are all the same. How can you tell what order they are coming back in?
No description provided.