diff options
author | Tomohito Nakayama <nkym.tmht@hotmail.co.jp> | 2019-08-01 23:04:39 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-08-01 10:04:39 -0400 |
commit | deec1b9b97011d1a0ef7312c0a3efde21186b82d (patch) | |
tree | 9093e51b246ee439ba02b3bd39b7a84f32e2f074 /js/blob_test.ts | |
parent | 3971dcfe10b94e901a224b5328a9dafd1e2ecc08 (diff) |
Implement function convertLineEndingsToNative in blob.ts (#2695)
based on https://w3c.github.io/FileAPI/#convert-line-endings-to-native
Diffstat (limited to 'js/blob_test.ts')
-rw-r--r-- | js/blob_test.ts | 9 |
1 files changed, 9 insertions, 0 deletions
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. |