Skip to content

Commit d226546

Browse files
committed
test(bson-corpus): import EJSON from BSON
1 parent ec61362 commit d226546

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/node/bson_corpus_tests.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
const Buffer = require('buffer').Buffer;
44
const BSON = require('../../lib/bson');
55
const Decimal128 = BSON.Decimal128;
6+
const EJSON = BSON.EJSON;
67
const expect = require('chai').expect;
7-
const EJSON = require('../../lib/extended_json');
88

9-
var deserializeOptions = {
9+
const deserializeOptions = {
1010
bsonRegExp: true,
1111
promoteLongs: true,
1212
promoteValues: false
1313
};
1414

15-
var serializeOptions = {
15+
const serializeOptions = {
1616
ignoreUndefined: false
1717
};
1818

@@ -25,7 +25,7 @@ function nativeToBson(native) {
2525
}
2626

2727
function bsonToNative(bson) {
28-
var deserializeOptions = {
28+
const deserializeOptions = {
2929
bsonRegExp: true,
3030
promoteLongs: true,
3131
promoteValues: false
@@ -209,7 +209,7 @@ describe('BSON Corpus', function() {
209209
describe('decodeErrors', function() {
210210
scenario.decodeErrors.forEach(d => {
211211
it(d.description, function() {
212-
var B = Buffer.from(d.bson, 'hex');
212+
const B = Buffer.from(d.bson, 'hex');
213213
expect(() => BSON.deserialize(B, deserializeOptions)).to.throw();
214214
});
215215
});

0 commit comments

Comments
 (0)