From 26ca0e39b47024372271b6267d93cc39eda48790 Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Sun, 12 Jul 2020 00:12:16 -0700 Subject: [PATCH] create test illustrating a bug --- test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test.js b/test.js index 52fdb72..ae73beb 100644 --- a/test.js +++ b/test.js @@ -114,6 +114,12 @@ test('Blob slice(0, -1)', async t => { t.is(await blob.text(), 'abcdefg'); }); +test('Blob(["hello ", "world"]).slice(5)', async t => { + const parts = ['hello ', 'world']; + const blob = new Blob(parts); + t.is(await blob.slice(5).text(), ' world'); +}); + test('throw away unwanted parts', async t => { const blob = new Blob(['a', 'b', 'c']).slice(1, 2); t.is(await blob.text(), 'b');