Commit 1d4ba1be authored by Sudaraka Wijesinghe's avatar Sudaraka Wijesinghe Committed by Rich Trott
Browse files

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: default avatarLuigi Pinca <luigipinca@gmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent f68e0d18
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment