Skip to content

Commit d3d4e43

Browse files
committed
format
1 parent 3f37eaf commit d3d4e43

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

test/bench/etc/is_valid.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
'use strict';
2+
3+
const Benchmark = require('benchmark');
4+
const { ObjectId } = require('../../../.');
5+
6+
const suite = new Benchmark.Suite();
7+
8+
const data = [];
9+
10+
suite
11+
// Test calling isValid with a valid objectId hex
12+
.add('ObjectId#isValid', function () {
13+
ObjectId.isValid('6683fe22cd402749418c7e2b');
14+
})
15+
// Test calling isValid with an INVALID objectId hex
16+
.add('ObjectId#isValid with invalid string', function () {
17+
ObjectId.isValid('6683fE22cd402749418c7e2x');
18+
})
19+
.on('cycle', function (event) {
20+
console.log(String(event.target));
21+
})
22+
.run({ async: true });

test/bench/etc/resultsCollectedMeans.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

test/node/bigint.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('BSON BigInt support', function() {
2020
const outputDoc = BSON.deserialize(serializedDoc, { useBigInt64: true });
2121

2222
expect(outputDoc).to.deep.equal(inputDoc);
23-
})
23+
});
2424
}
2525
});
2626

0 commit comments

Comments
 (0)