mirror of
https://github.com/denoland/deno.git
synced 2025-09-22 10:22:34 +00:00
Implement function convertLineEndingsToNative in blob.ts (#2695)
based on https://w3c.github.io/FileAPI/#convert-line-endings-to-native
This commit is contained in:
parent
3971dcfe10
commit
deec1b9b97
2 changed files with 56 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue