Skip to content

Commit e78c0c4

Browse files
committed
feat: add temporary logging
1 parent 7d62e97 commit e78c0c4

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/CloudConvert.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ export default class CloudConvert {
154154
duplex: 'half'
155155
});
156156
if (!res.ok) {
157+
console.error('SND:', url, method, headers);
158+
console.error('RCV:', res, await res.text());
157159
// @ts-expect-error cause not present in types yet
158160
throw new Error(res.statusText, { cause: res });
159161
}

tests/integration/TasksResourceTest.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,22 @@ describe('TasksResource', () => {
1616
name: 'upload-test'
1717
});
1818

19+
console.log('task', task);
1920
const stream = fs.createReadStream(
2021
__dirname + '/../integration/files/input.png'
2122
);
2223

23-
await cloudConvert.tasks.upload(task, stream);
24+
const res = await cloudConvert.tasks.upload(task, stream);
25+
console.log('upload', res);
2426

2527
task = await cloudConvert.tasks.wait(task.id);
28+
console.log('task', task);
2629

2730
assert.equal(task.status, 'finished');
2831
assert.equal(task.result.files[0].filename, 'input.png');
2932

30-
await cloudConvert.tasks.delete(task.id);
33+
const del = await cloudConvert.tasks.delete(task.id);
34+
console.log(del);
3135
}).timeout(30000);
3236
});
3337
});

0 commit comments

Comments
 (0)