From 18973aa0601c564f7769600846cd4fa26f47c154 Mon Sep 17 00:00:00 2001 From: Daniel Bankhead Date: Wed, 6 Sep 2023 11:20:55 -0700 Subject: [PATCH] test: remove unneccesary test --- test/file.ts | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/test/file.ts b/test/file.ts index 567cf77d4..4aa19968d 100644 --- a/test/file.ts +++ b/test/file.ts @@ -4365,31 +4365,6 @@ describe('File', () => { } }); - it('Destroyed Readable upload should throw', async () => { - const options = {resumable: false}; - - file.createWriteStream = () => { - throw new Error('unreachable'); - }; - try { - const readable = new Readable({ - read() { - this.push(DATA); - this.push(null); - }, - }); - - readable.destroy(); - - await file.save(readable, options); - } catch (e) { - assert.strictEqual( - (e as Error).message, - FileExceptionMessages.STREAM_NOT_READABLE - ); - } - }); - it('should save a generator with no error', done => { const options = {resumable: false}; file.createWriteStream = () => { @@ -4439,33 +4414,6 @@ describe('File', () => { }); }); - it('should error on invalid async iterator data', done => { - const options = {resumable: false}; - file.createWriteStream = () => { - const writeStream = new PassThrough(); - let errorCalled = false; - writeStream.on('error', () => { - errorCalled = true; - }); - writeStream.on('finish', () => { - assert.ok(errorCalled); - }); - return writeStream; - }; - - const generator = async function* () { - yield {thisIsNot: 'a buffer or a string'}; - }; - - file.save(generator(), options, (err: Error) => { - assert.strictEqual( - err.message, - 'The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object' - ); - done(); - }); - }); - it('buffer upload should retry on first failure', async () => { const options = { resumable: false,