@uploadista/client-core 0.0.20 → 0.1.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,10 @@ describe("buildFlowInputs", () => {
23
23
  });
24
24
 
25
25
  it("builds init operation for Blob input", () => {
26
- const blob = new Blob(["content"], { type: "application/json" });
26
+ const blob = new Blob(["content"], {
27
+ type: "application/json",
28
+ lastModified: 0,
29
+ });
27
30
  const result = buildFlowInputs({ "blob-node": blob }, storageId);
28
31
 
29
32
  expect(result["blob-node"]).toMatchObject({
@@ -40,7 +43,7 @@ describe("buildFlowInputs", () => {
40
43
  const file = new File(["content"], "", { type: "text/plain" });
41
44
  const result = buildFlowInputs({ node: file }, storageId);
42
45
 
43
- expect(result["node"]).toMatchObject({
46
+ expect(result.node).toMatchObject({
44
47
  metadata: {
45
48
  originalName: "",
46
49
  },
@@ -51,7 +54,7 @@ describe("buildFlowInputs", () => {
51
54
  const file = new File(["content"], "test.txt");
52
55
  const result = buildFlowInputs({ node: file }, storageId);
53
56
 
54
- expect(result["node"]).toMatchObject({
57
+ expect(result.node).toMatchObject({
55
58
  metadata: {
56
59
  mimeType: "",
57
60
  },
@@ -150,11 +153,11 @@ describe("buildFlowInputs", () => {
150
153
  const file2 = new File(["content2"], "file2.txt");
151
154
  const result = buildFlowInputs({ node1: file1, node2: file2 }, storageId);
152
155
 
153
- expect(result["node1"]).toMatchObject({
156
+ expect(result.node1).toMatchObject({
154
157
  operation: "init",
155
158
  metadata: { originalName: "file1.txt" },
156
159
  });
157
- expect(result["node2"]).toMatchObject({
160
+ expect(result.node2).toMatchObject({
158
161
  operation: "init",
159
162
  metadata: { originalName: "file2.txt" },
160
163
  });
@@ -206,7 +209,7 @@ describe("buildFlowInputs", () => {
206
209
  const file = new File(["content"], "test.txt");
207
210
  const result = buildFlowInputs({ node: file }, "custom-storage");
208
211
 
209
- expect(result["node"]).toMatchObject({
212
+ expect(result.node).toMatchObject({
210
213
  storageId: "custom-storage",
211
214
  });
212
215
  });
@@ -215,7 +218,7 @@ describe("buildFlowInputs", () => {
215
218
  const url = "https://example.com/file.jpg";
216
219
  const result = buildFlowInputs({ node: url }, "custom-storage");
217
220
 
218
- expect(result["node"]).toMatchObject({
221
+ expect(result.node).toMatchObject({
219
222
  storageId: "custom-storage",
220
223
  });
221
224
  });