Exercise 4: My First Async I/O - fails with correct result
thathurtabit opened this issue · 0 comments
thathurtabit commented
Hi.
On exercise 4, when running verify, I get:
## MY FIRST ASYNC I/O! (Exercise 4 of 13)
Your submission results compared to the expected:
ACTUAL EXPECTED
────────────────────────────────────────────────────────────────────────────────
"27" == "27"
"" == ""
────────────────────────────────────────────────────────────────────────────────
✓
Submission results match expected
# FAIL Your solution to MY FIRST ASYNC I/O! didn't pass. Try again!
My solution was:
const fs = require("fs");
const promisify = require("util").promisify;
promisify(fs.readFile)(process.argv[2])
.then(data => console.log(data.toString().split("\n").length - 1))
.catch(error => console.log(error));
I'm not sure if this is my mistake as it says: Submission results match expected