diff options
author | lionel-rowe <lionel.rowe@gmail.com> | 2023-09-14 13:06:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 07:06:58 +0200 |
commit | 2046aeed70efac1e17f1df8873da25e00bb4e2b2 (patch) | |
tree | f9d81ed201256ebc6964177635c0507ac22d6c73 /cli/tests/unit/file_test.ts | |
parent | e60cbfadc0c75d48ff004fa8f47d4b5d022cb98c (diff) |
feat(ext/web): Add name to Deno.customInspect of File objects (#20415)
Fixes https://github.com/denoland/deno/issues/20414
Diffstat (limited to 'cli/tests/unit/file_test.ts')
-rw-r--r-- | cli/tests/unit/file_test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/unit/file_test.ts b/cli/tests/unit/file_test.ts index 23583ac2e..26ee110b6 100644 --- a/cli/tests/unit/file_test.ts +++ b/cli/tests/unit/file_test.ts @@ -99,3 +99,14 @@ Deno.test(function fileUsingNumberFileName() { Deno.test(function fileUsingEmptyStringFileName() { testSecondArgument("", ""); }); + +Deno.test(function inspectFile() { + assertEquals( + Deno.inspect(new File([], "file-name.txt")), + `File { name: "file-name.txt", size: 0, type: "" }`, + ); + assertEquals( + Deno.inspect(new File([], "file-name.txt", { type: "text/plain" })), + `File { name: "file-name.txt", size: 0, type: "text/plain" }`, + ); +}); |