test: refactor test-file-write-stream
Replace all `var` occurrences in test-file-write-stream.js with
`const` (where they are not being reassigned) and `let` (where they are
being reassigned).
Add strict comparison to the asserts and if statements:
- Replace `assert.equal` with `assert.strictEqual` where:
1. Result of `typeof` being compared to a string literal.
2. Result of `fs.readFileSync` with UTF-8 encoding being compared to
a string constant.
- Replace `==` with `===` where integer values are being compared to
integer literals.
Remove unnecessary very IIFE.
Use template literals.
PR-URL: https://github.com/nodejs/node/pull/8894
Reviewed-By:
Luigi Pinca <luigipinca@gmail.com>
Reviewed-By:
Rich Trott <rtrott@gmail.com>
Reviewed-By:
Anna Henningsen <anna@addaleax.net>
Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
parent
f68e0d18
Please register or sign in to comment