Lab-03-Logan-Absher#11
Lab-03-Logan-Absher#11loganabsher wants to merge 2 commits intocodefellows-javascript-401d17:masterfrom
Conversation
main functionallity works, tests still failing
| describe('logging in correct order', () => { | ||
| it('Should log one.txt then two.txt then three.txt', (done) => { | ||
| fr.fileRunner((err) => { | ||
| expect(err).to.equal('null'); |
There was a problem hiding this comment.
the string 'null' is different from the keyword null; Also you are passing in a callback function to a function that has a first parameter of path.Also you want this function to be able to accept some sort of Data back so that you can actually test that.
|
|
||
| exports.fileRunner = (err, data) => { | ||
| const filesNames = ['one.txt', 'two.txt', 'three.txt']; | ||
| filesNames.forEach((ele) => { |
There was a problem hiding this comment.
This does not guarantee that they will complete in order. If the first takes longer then the 2nd it could be different. They will probably come back in order because on your computer it happens so fast that it won't be super noticeable and the speeds won't vary much. Also you are passing through ele, and err which the ele is the path so that is fine but the err is actually the callback from the test. While technically this is correct because fileReader wants the callback you shouldn't be calling it error because that isn't what it is.
No description provided.