summaryrefslogtreecommitdiff
path: root/tests/unit/esnext_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/esnext_test.ts')
-rw-r--r--tests/unit/esnext_test.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit/esnext_test.ts b/tests/unit/esnext_test.ts
index cb40cc241..1d5759aaf 100644
--- a/tests/unit/esnext_test.ts
+++ b/tests/unit/esnext_test.ts
@@ -48,3 +48,12 @@ Deno.test(function setUnion() {
const union = a.union(b);
assertEquals(union, new Set([1, 2, 3, 4, 5]));
});
+
+Deno.test(function float16Array() {
+ const myNums = Float16Array.from([11.25, 2, -22.5, 1]);
+ const sorted = myNums.toSorted((a, b) => a - b);
+ assertEquals(sorted[0], -22.5);
+ assertEquals(sorted[1], 1);
+ assertEquals(sorted[2], 2);
+ assertEquals(sorted[3], 11.25);
+});