diff options
author | Paul Thompson <paul.thompson773@gmail.com> | 2020-08-11 22:00:53 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-11 14:00:53 +0200 |
commit | eed77aa0208e603dac908a240dd66ece422e9dd7 (patch) | |
tree | 263f539c6bfe40d19bb8b8c591466887e3a686a7 /cli/tests/unit/progressevent_test.ts | |
parent | d7077b9073dec6fb1f4b07d5575ef416997c19a9 (diff) |
feat(web): FileReader API (#6673)
Diffstat (limited to 'cli/tests/unit/progressevent_test.ts')
-rw-r--r-- | cli/tests/unit/progressevent_test.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cli/tests/unit/progressevent_test.ts b/cli/tests/unit/progressevent_test.ts new file mode 100644 index 000000000..4f852e458 --- /dev/null +++ b/cli/tests/unit/progressevent_test.ts @@ -0,0 +1,18 @@ +// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. +import { unitTest, assertEquals } from "./test_util.ts"; + +unitTest(function progressEventConstruct(): void { + const progressEventDefs = new ProgressEvent("progressEventType", {}); + assertEquals(progressEventDefs.lengthComputable, false); + assertEquals(progressEventDefs.loaded, 0); + assertEquals(progressEventDefs.total, 0); + + const progressEvent = new ProgressEvent("progressEventType", { + lengthComputable: true, + loaded: 123, + total: 456, + }); + assertEquals(progressEvent.lengthComputable, true); + assertEquals(progressEvent.loaded, 123); + assertEquals(progressEvent.total, 456); +}); |