diff --git a/src/constants.ts b/src/constants.ts index a56b8031..1311ef06 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,5 @@ /** @internal */ -export const BSON_MAJOR_VERSION = 5 as const; +export const BSON_MAJOR_VERSION = 6 as const; /** @internal */ export const BSON_INT32_MAX = 0x7fffffff; diff --git a/test/node/bson_type_classes.test.ts b/test/node/bson_type_classes.test.ts index 3d7c3497..7b9b2105 100644 --- a/test/node/bson_type_classes.test.ts +++ b/test/node/bson_type_classes.test.ts @@ -80,8 +80,8 @@ describe('BSON Type classes common interfaces', () => { )); } - it(`defines a Symbol.for('@@mdb.bson.version') property equal to 5`, () => - expect(TypeClass.prototype).to.have.property(Symbol.for('@@mdb.bson.version'), 5)); + it(`defines a Symbol.for('@@mdb.bson.version') property equal to 6`, () => + expect(TypeClass.prototype).to.have.property(Symbol.for('@@mdb.bson.version'), 6)); it(`defines a static fromExtendedJSON() method`, () => expect(TypeClass).to.have.property('fromExtendedJSON').that.is.a('function')); diff --git a/test/node/constants.test.ts b/test/node/constants.test.ts index 03ef21d2..77d17e94 100644 --- a/test/node/constants.test.ts +++ b/test/node/constants.test.ts @@ -3,6 +3,12 @@ import { Binary } from '../register-bson'; import * as constants from '../../src/constants'; describe('BSON Constants', () => { + describe('.BSON_MAJOR_VERSION', () => { + it('returns the current major version', () => { + expect(constants.BSON_MAJOR_VERSION).to.equal(6); + }); + }); + context('Binary Subtype', () => { /* subtype ::= diff --git a/test/node/parser/serializer.test.ts b/test/node/parser/serializer.test.ts index d09c11b1..c06161cc 100644 --- a/test/node/parser/serializer.test.ts +++ b/test/node/parser/serializer.test.ts @@ -47,7 +47,7 @@ describe('serialize()', () => { // a nested invalid _bsontype throws something different expect(() => BSON.serialize({ - a: { _bsontype: 'iLoveJavascript', [Symbol.for('@@mdb.bson.version')]: 5 } + a: { _bsontype: 'iLoveJavascript', [Symbol.for('@@mdb.bson.version')]: 6 } }) ).to.throw(/invalid _bsontype/); });