Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
Signed-off-by: jace-roell <[email protected]>
  • Loading branch information
jace-roell committed Dec 16, 2024
1 parent 73296b4 commit c2a618c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ describe("Upload Data Set", () => {

expect(error).toBeFalsy();

expect(uploadResponse.apiResponse).toMatchObject({"success": true, "from": "<Buffer 61 62 63 64 65 66 67 68 69 6a...>","to": dsname+"(TEST)"});
expect(uploadResponse.apiResponse).toMatchObject({
success: true,
from: "<Buffer 61 62 63 64 65 66 67 68 69 6a...>",
to: dsname + "(TEST)",
});
expect(Buffer.from(getResponse.toString().trim())).toEqual(data);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { IUploadOptions } from "../../../../src/methods/upload/doc/IUploadOption
import { Upload } from "../../../../src/methods/upload/Upload";
import { List } from "../../../../src/methods/list/List";
import { Utilities } from "../../../../src/methods/utilities/Utilities";
import { inspect } from "util";
import { ZosFilesUtils } from "../../../../src/utils/ZosFilesUtils";
import { stripNewLines } from "../../../../../../__tests__/__src__/TestUtils";
import { Create } from "../../../../src/methods/create";
Expand Down
18 changes: 14 additions & 4 deletions packages/zosfiles/src/methods/upload/Upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,13 @@ export class Upload {
// By default, apiResponse is empty when uploading
const apiResponse: any = {
success: true,
from: fileBuffer.length > maxBufferPreviewSize ? inspect(fileBuffer.subarray(0, maxBufferPreviewSize)).slice(0, -1) + "...>" : inspect(fileBuffer),
to: dataSetName
from:
fileBuffer.length > maxBufferPreviewSize
? inspect(
fileBuffer.subarray(0, maxBufferPreviewSize)
).slice(0, -1) + "...>"
: inspect(fileBuffer),
to: dataSetName,
};

// Return Etag in apiResponse, if requested
Expand Down Expand Up @@ -493,8 +498,13 @@ export class Upload {
// By default, apiResponse is empty when uploading
const apiResponse: any = {
success: true,
from: fileBuffer.length > maxBufferPreviewSize ? inspect(fileBuffer.subarray(0, maxBufferPreviewSize)).slice(0, -1) + "...>" : inspect(fileBuffer),
to: origUssname
from:
fileBuffer.length > maxBufferPreviewSize
? inspect(
fileBuffer.subarray(0, maxBufferPreviewSize)
).slice(0, -1) + "...>"
: inspect(fileBuffer),
to: origUssname,
};

// Return Etag in apiResponse, if requested
Expand Down

0 comments on commit c2a618c

Please sign in to comment.