Skip to content

Commit 7db2f7f

Browse files
committed
eslint
1 parent c88d8cc commit 7db2f7f

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

test/unit/assorted/server_discovery_and_monitoring.spec.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ describe('Server Discovery and Monitoring (spec)', function () {
207207
topologySelectServers = sinon
208208
.stub(Topology.prototype, 'selectServer')
209209

210-
.callsFake(function (selector, options) {
210+
.callsFake(function (_selector, _options) {
211211
topologySelectServers.restore();
212212

213213
const fakeServer = { s: { state: 'connected' }, removeListener: () => true };

test/unit/assorted/server_selection_latency_window_utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { EJSON } from 'bson';
22
import { expect } from 'chai';
33
import { readdirSync, readFileSync } from 'fs';
44
import { join } from 'path';
5-
import { promisify } from 'util';
65

76
import {
87
ReadPreference,

test/unit/assorted/server_selection_spec_helper.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,12 @@ function executeServerSelectionTest(testDefinition, testDone) {
100100
const topology = topologyWithPlaceholderClient(seedData.seedlist, topologyOptions);
101101
// Each test will attempt to connect by doing server selection. We want to make the first
102102
// call to `selectServers` call a fake, and then immediately restore the original behavior.
103-
let topologySelectServers = sinon
104-
.stub(Topology.prototype, 'selectServer')
105-
.callsFake(function (selector, options) {
106-
topologySelectServers.restore();
103+
let topologySelectServers = sinon.stub(Topology.prototype, 'selectServer').callsFake(function () {
104+
topologySelectServers.restore();
107105

108-
const fakeServer = { s: { state: 'connected' }, removeListener: () => {} };
109-
return Promise.resolve(fakeServer);
110-
});
106+
const fakeServer = { s: { state: 'connected' }, removeListener: () => {} };
107+
return Promise.resolve(fakeServer);
108+
});
111109

112110
function done(err) {
113111
topology.close();

test/unit/sdam/topology.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ describe('Topology (unit)', function () {
448448
// satisfy the initial connect, then restore the original method
449449
const selectServer = this.sinon
450450
.stub(Topology.prototype, 'selectServer')
451-
.callsFake(function (selector, options) {
451+
.callsFake(function () {
452452
const server = Array.from(this.s.servers.values())[0];
453453
selectServer.restore();
454454
return Promise.resolve(server);
@@ -496,7 +496,7 @@ describe('Topology (unit)', function () {
496496
const topology = topologyWithPlaceholderClient('someserver:27019');
497497
const selectServer = this.sinon
498498
.stub(Topology.prototype, 'selectServer')
499-
.callsFake(async function (selector, options) {
499+
.callsFake(async function () {
500500
const server = Array.from(this.s.servers.values())[0];
501501
selectServer.restore();
502502
return server;

0 commit comments

Comments
 (0)