Skip to content

Commit aec297a

Browse files
little bit of code golf
1 parent e90e3ff commit aec297a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

test/unit/cmap/wire_protocol/responses.test.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ describe('class MongoDBResponse', () => {
3636

3737
expect(deseriailzeSpy).to.have.been.called;
3838

39-
const [_buffer, { validation }] = deseriailzeSpy.getCalls()[0].args;
39+
const [
40+
{
41+
args: [_buffer, { validation }]
42+
}
43+
] = deseriailzeSpy.getCalls();
4044

4145
expect(validation).to.deep.equal({ utf8: { writeErrors: false } });
4246
});
@@ -50,7 +54,11 @@ describe('class MongoDBResponse', () => {
5054

5155
expect(deseriailzeSpy).to.have.been.called;
5256

53-
const [_buffer, { validation }] = deseriailzeSpy.getCalls()[0].args;
57+
const [
58+
{
59+
args: [_buffer, { validation }]
60+
}
61+
] = deseriailzeSpy.getCalls();
5462

5563
expect(validation).to.deep.equal({ utf8: { writeErrors: false } });
5664
});
@@ -64,7 +72,11 @@ describe('class MongoDBResponse', () => {
6472

6573
expect(deseriailzeSpy).to.have.been.called;
6674

67-
const [_buffer, { validation }] = deseriailzeSpy.getCalls()[0].args;
75+
const [
76+
{
77+
args: [_buffer, { validation }]
78+
}
79+
] = deseriailzeSpy.getCalls();
6880

6981
expect(validation).to.deep.equal({ utf8: false });
7082
});

0 commit comments

Comments
 (0)