From deec1b9b97011d1a0ef7312c0a3efde21186b82d Mon Sep 17 00:00:00 2001 From: Tomohito Nakayama Date: Thu, 1 Aug 2019 23:04:39 +0900 Subject: Implement function convertLineEndingsToNative in blob.ts (#2695) based on https://w3c.github.io/FileAPI/#convert-line-endings-to-native --- js/blob_test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'js/blob_test.ts') diff --git a/js/blob_test.ts b/js/blob_test.ts index b11a22f3c..7fc7db1e2 100644 --- a/js/blob_test.ts +++ b/js/blob_test.ts @@ -50,4 +50,13 @@ test(function blobShouldNotThrowError(): void { assertEquals(hasThrown, false); }); +test(function nativeEndLine(): void { + const options: object = { + ending: "native" + }; + let blob = new Blob(["Hello\nWorld"], options); + + assertEquals(blob.size, Deno.build.os === "win" ? 12 : 11); +}); + // TODO(qti3e) Test the stored data in a Blob after implementing FileReader API. -- cgit v1.2.3