Skip to content

Commit 6c66e57

Browse files
committed
Add tests
1 parent efcf8d8 commit 6c66e57

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/compass-components/src/components/bson-value.spec.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ describe('BSONValue', function () {
4545
value: Binary.createFromHexString('3132303d', Binary.SUBTYPE_UUID),
4646
expected: "UUID('3132303d')",
4747
},
48+
{
49+
type: 'Binary',
50+
value: Binary.fromInt8Array(new Int8Array([1, 2, 3])),
51+
expected: 'Binary.fromInt8Array(new Int8Array([1, 2, 3]))',
52+
},
53+
{
54+
type: 'Binary',
55+
value: Binary.fromFloat32Array(new Float32Array([1.1, 2.2, 3.3])),
56+
expected: 'Binary.fromFloat32Array(new Float32Array([1.1, 2.2, 3.3]))',
57+
},
58+
{
59+
type: 'Binary',
60+
value: Binary.fromPackedBits(new Uint8Array([1, 2, 3])),
61+
expected: 'Binary.fromPackedBits(new Uint8Array([1, 2, 3]))',
62+
},
4863
{
4964
type: 'Code',
5065
value: new Code('var a = 1', { foo: 2 }),

0 commit comments

Comments
 (0)