Skip to content

Commit 516a3c6

Browse files
developher-netljharb
authored andcommitted
refactor: use type-safe String() instead of .toString()
Co-authored-by: Jordan Harband <ljharb@gmail.com>
1 parent 8a79ec6 commit 516a3c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cli.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ async function getCliInstallCommand(extraArgs) {
5757
const fullstderr = [];
5858
cli.stdout.on("data", data => {
5959
// not guaranteed to be line-by-line in fact these can be Buffers
60-
fullstdout.push(data.toString());
60+
fullstdout.push(String(data));
6161
});
6262
cli.stderr.on("data", data => {
6363
// not guaranteed to be line-by-line in fact these can be Buffers
64-
fullstderr.push(data.toString());
64+
fullstderr.push(String(data));
6565
});
6666
cli.on("close", code => {
6767
if (code !== 0) {

0 commit comments

Comments
 (0)