Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions test/node/bson_type_classes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
6 changes: 6 additions & 0 deletions test/node/constants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ::=
Expand Down
2 changes: 1 addition & 1 deletion test/node/parser/serializer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/);
});
Expand Down