Skip to content

Commit 270da11

Browse files
committed
chore: fix api version tests
1 parent 0204f4a commit 270da11

File tree

1 file changed

+39
-27
lines changed

1 file changed

+39
-27
lines changed

test/integration/node-specific/mongo_client.test.ts

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,16 @@ describe('class MongoClient', function () {
154154
spy.restore();
155155
});
156156

157-
it('passes through the option', function () {
158-
expect(spy).to.have.been.calledWith(
159-
sinon.match({
160-
keepAlive: true,
161-
keepAliveInitialDelay: 0
162-
})
163-
);
157+
it('passes through the option', {
158+
metadata: { requires: { apiVersion: false } },
159+
test: function () {
160+
expect(spy).to.have.been.calledWith(
161+
sinon.match({
162+
keepAlive: true,
163+
keepAliveInitialDelay: 0
164+
})
165+
);
166+
}
164167
});
165168
});
166169

@@ -181,13 +184,16 @@ describe('class MongoClient', function () {
181184
spy.restore();
182185
});
183186

184-
it('passes through the option', function () {
185-
expect(spy).to.have.been.calledWith(
186-
sinon.match({
187-
keepAlive: true,
188-
keepAliveInitialDelay: 100
189-
})
190-
);
187+
it('passes through the option', {
188+
metadata: { requires: { apiVersion: false } },
189+
test: function () {
190+
expect(spy).to.have.been.calledWith(
191+
sinon.match({
192+
keepAlive: true,
193+
keepAliveInitialDelay: 100
194+
})
195+
);
196+
}
191197
});
192198
});
193199

@@ -208,13 +214,16 @@ describe('class MongoClient', function () {
208214
spy.restore();
209215
});
210216

211-
it('sets the option to 0', function () {
212-
expect(spy).to.have.been.calledWith(
213-
sinon.match({
214-
keepAlive: true,
215-
keepAliveInitialDelay: 0
216-
})
217-
);
217+
it('sets the option to 0', {
218+
metadata: { requires: { apiVersion: false } },
219+
test: function () {
220+
expect(spy).to.have.been.calledWith(
221+
sinon.match({
222+
keepAlive: true,
223+
keepAliveInitialDelay: 0
224+
})
225+
);
226+
}
218227
});
219228
});
220229
});
@@ -285,12 +294,15 @@ describe('class MongoClient', function () {
285294
spy.restore();
286295
});
287296

288-
it('sets noDelay', function () {
289-
expect(spy).to.have.been.calledWith(
290-
sinon.match({
291-
noDelay: false
292-
})
293-
);
297+
it('sets noDelay', {
298+
metadata: { requires: { apiVersion: false } },
299+
test: function () {
300+
expect(spy).to.have.been.calledWith(
301+
sinon.match({
302+
noDelay: false
303+
})
304+
);
305+
}
294306
});
295307
});
296308
});

0 commit comments

Comments
 (0)