Skip to content

Commit c9510c5

Browse files
committed
style: fix prettier linting issues
1 parent dc9c1bb commit c9510c5

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

test/node/bson_test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2367,7 +2367,12 @@ describe('BSON', function() {
23672367
const badBsonType = Object.assign({}, oid, { _bsontype: 'bogus' });
23682368
const badDoc = { bad: badBsonType };
23692369
const badArray = [oid, badDoc];
2370-
const badMap = new Map([['a', badBsonType], ['b', badDoc], ['c', badArray]]);
2370+
const badMap = new Map([
2371+
['a', badBsonType],
2372+
['b', badDoc],
2373+
['c', badArray]
2374+
]);
2375+
23712376
expect(() => BSON.serialize(badDoc)).to.throw();
23722377
expect(() => BSON.serialize(badArray)).to.throw();
23732378
expect(() => BSON.serialize(badMap)).to.throw();

test/node/map_tests.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ describe('Map', function() {
99
* @ignore
1010
*/
1111
it('should correctly exercise the map', function(done) {
12-
var m = new M([['a', 1], ['b', 2]]);
12+
var m = new M([
13+
['a', 1],
14+
['b', 2]
15+
]);
16+
1317
expect(m.has('a')).to.be.ok;
1418
expect(m.has('b')).to.be.ok;
1519
expect(1).to.equal(m.get('a'));
@@ -47,7 +51,10 @@ describe('Map', function() {
4751
values.push([key, value]);
4852
}, m);
4953

50-
expect([['a', 3], ['b', 2]]).to.deep.equal(values);
54+
expect([
55+
['a', 3],
56+
['b', 2]
57+
]).to.deep.equal(values);
5158

5259
// Modify the state
5360
expect(true).to.equal(m.delete('a'));
@@ -83,15 +90,21 @@ describe('Map', function() {
8390
*/
8491
it('should serialize a map', function(done) {
8592
// Serialize top level map only
86-
var m = new M([['a', 1], ['b', 2]]);
93+
var m = new M([
94+
['a', 1],
95+
['b', 2]
96+
]);
8797
// Serialize the map
8898
var data = BSON.serialize(m, false, true);
8999
// Deserialize the data
90100
var object = BSON.deserialize(data);
91101
expect({ a: 1, b: 2 }).to.deep.equal(object);
92102

93103
// Serialize nested maps
94-
var m1 = new M([['a', 1], ['b', 2]]);
104+
var m1 = new M([
105+
['a', 1],
106+
['b', 2]
107+
]);
95108
m = new M([['c', m1]]);
96109
// Serialize the map
97110
data = BSON.serialize(m, false, true);
@@ -101,7 +114,10 @@ describe('Map', function() {
101114
done();
102115

103116
// Serialize top level map only
104-
m = new M([['1', 1], ['0', 2]]);
117+
m = new M([
118+
['1', 1],
119+
['0', 2]
120+
]);
105121
// Serialize the map, validating that the order in the resulting BSON is preserved
106122
data = BSON.serialize(m, false, true);
107123
expect('13000000103100010000001030000200000000').to.equal(data.toString('hex'));

0 commit comments

Comments
 (0)