Skip to content

Commit 107bb8e

Browse files
a-tylendapatuwwy
authored andcommitted
Remove toString()
1 parent 7523f83 commit 107bb8e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

bdd/data/sequences/bin-out-seq/dist/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ var fs_1 = require("fs");
4040
var stream_1 = require("stream");
4141
var crypto = require("crypto");
4242
var mod = [
43-
// eslint-disable-next-line consistent-return
4443
function (_stream, filePath) {
4544
if (filePath === void 0) { filePath = "".concat(__dirname, "/random.bin"); }
4645
return __awaiter(this, void 0, void 0, function () {

bdd/step-definitions/e2e/host-steps.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import fs, { createReadStream, existsSync, ReadStream } from "fs";
2020
import { HostClient, InstanceOutputStream } from "@scramjet/api-client";
2121
import { HostUtils } from "../../lib/host-utils";
2222
import { PassThrough, Readable, Stream, Writable } from "stream";
23-
import crypto from "crypto";
23+
import crypto, { BinaryLike } from "crypto";
2424
import { promisify } from "util";
2525
import Dockerode from "dockerode";
2626
import { CustomWorld } from "../world";
@@ -67,7 +67,7 @@ const streamToString = async (stream: Stream): Promise<string> => {
6767

6868
return chunks.join("");
6969
};
70-
const streamToBinary = async (stream: Readable): Promise<string> => {
70+
const streamToBinary = async (stream: Readable): Promise<BinaryLike> => {
7171
const chunks: Uint8Array[] = [];
7272

7373
return new Promise((resolve, reject) => {
@@ -78,7 +78,7 @@ const streamToBinary = async (stream: Readable): Promise<string> => {
7878
stream.on("end", () => {
7979
const binaryData = Buffer.concat(chunks);
8080

81-
resolve(binaryData.toString("binary"));
81+
resolve(binaryData);
8282
});
8383

8484
stream.on("error", (error: Error) => {
@@ -506,7 +506,7 @@ When("confirm file checksum match output checksum", async function(this: CustomW
506506
.update(dataFromOutput)
507507
.digest("hex");
508508

509-
assert.equal(outputHex, fileHexFromStdout);
509+
assert.strictEqual(outputHex, fileHexFromStdout.trim());
510510
});
511511

512512
When(

0 commit comments

Comments
 (0)