Skip to content

Commit b03dfa1

Browse files
authored
test: fix incorrect uuid construction (#3372)
1 parent ad8fb25 commit b03dfa1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/integration/crud/insert.test.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,13 @@ describe('crud - insert', function () {
665665

666666
// Generate a binary id
667667
var binaryUUID = new Binary(
668-
'00000078123456781234567812345678',
668+
Buffer.from('00000078123456781234567812345678', 'hex'),
669669
Binary.SUBTYPE_UUID
670670
);
671671

672+
// UUID must be 16 bytes
673+
expect(binaryUUID.buffer).to.have.property('byteLength', 16);
674+
672675
collection.insert(
673676
{ _id: binaryUUID, field: '2' },
674677
configuration.writeConcernMax(),

0 commit comments

Comments
 (0)