Skip to content

Commit c1ed2c1

Browse files
committed
fix: use properly camel cased form of mapReduce for command
1 parent e855c83 commit c1ed2c1

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

lib/operations/map_reduce.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class MapReduceOperation extends OperationBase {
6060
let options = this.options;
6161

6262
const mapCommandHash = {
63-
mapreduce: coll.collectionName,
63+
mapReduce: coll.collectionName,
6464
map: map,
6565
reduce: reduce
6666
};

test/functional/collations.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ describe('Collation', function() {
209209
}
210210
});
211211

212-
it('Successfully pass through collation to mapreduce command', {
212+
it('Successfully pass through collation to mapReduce command', {
213213
metadata: { requires: { generators: true, topology: 'single' } },
214214

215215
test: function() {
@@ -223,7 +223,7 @@ describe('Collation', function() {
223223
var doc = request.document;
224224
if (doc.ismaster) {
225225
request.reply(primary[0]);
226-
} else if (doc.mapreduce) {
226+
} else if (doc.mapReduce) {
227227
commandResult = doc;
228228
request.reply({ ok: 1, result: 'tempCollection' });
229229
} else if (doc.endSessions) {

test/functional/command_write_concern.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ describe('Command Write Concern', function() {
733733
}
734734
});
735735

736-
it('successfully pass through writeConcern to dropIndexes command', {
736+
it('successfully pass through writeConcern to mapReduce command', {
737737
metadata: {
738738
requires: {
739739
generators: true,
@@ -798,7 +798,7 @@ describe('Command Write Concern', function() {
798798
var doc = request.document;
799799
if (doc.ismaster) {
800800
request.reply(primary[0]);
801-
} else if (doc.mapreduce) {
801+
} else if (doc.mapReduce) {
802802
commandResult = doc;
803803
request.reply({ ok: 1, result: 'tempCollection' });
804804
} else if (doc.endSessions) {

test/functional/readconcern.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,13 @@ describe('ReadConcern', function() {
447447
const reduce = 'function(k,vals) { return 1; }';
448448

449449
// Listen to apm events
450-
client.on('commandStarted', filterForCommands('mapreduce', started));
451-
client.on('commandSucceeded', filterForCommands('mapreduce', succeeded));
450+
client.on('commandStarted', filterForCommands('mapReduce', started));
451+
client.on('commandSucceeded', filterForCommands('mapReduce', succeeded));
452452

453453
// Execute mapReduce
454454
collection.mapReduce(map, reduce, { out: { replace: 'tempCollection' } }, err => {
455455
expect(err).to.not.exist;
456-
validateTestResults(started, succeeded, 'mapreduce');
456+
validateTestResults(started, succeeded, 'mapReduce');
457457
done();
458458
});
459459
}

test/functional/readpreference.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ describe('ReadPreference', function() {
256256
/**
257257
* @ignore
258258
*/
259-
it('Should fail due to not using mapreduce inline with read preference', {
259+
it('Should fail due to not using mapReduce inline with read preference', {
260260
metadata: { requires: { mongodb: '>=2.6.0', topology: ['single', 'ssl'] } },
261261

262262
// The actual test we wish to run

test/unit/bypass_validation.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('bypass document validation', function() {
7979

8080
test.server.setMessageHandler(request => {
8181
const doc = request.document;
82-
if (doc.mapreduce) {
82+
if (doc.mapReduce) {
8383
try {
8484
expect(doc.bypassDocumentValidation).equal(config.expected);
8585
request.reply({

0 commit comments

Comments
 (0)