nickewing / line-reader

Asynchronous line-by-line file reader for node.js
MIT License
453 stars 75 forks source link

not working when loading the module from unit tests #37

Open amitguptagwl opened 7 years ago

amitguptagwl commented 7 years ago

I have no idea how it stops working when I load my module in unit tests while it works directly. I'm not spying fa or path modules.

I'm using jasmine for unit testing

console.log(filePath);//working
console.log(fs.readFileSync(filePath).toString());//working
lineReader.eachLine(filePath, function(line, last) {
    console.log(line);//not reaching here
});