Skip to content

Commit 978accb

Browse files
committed
test(ChangeStream): rewrite with const
1 parent 650eb54 commit 978accb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/change_stream_tests.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1271,18 +1271,18 @@ describe('Change Streams', function() {
12711271

12721272
// The actual test we wish to run
12731273
test: function(done) {
1274-
var configuration = this.configuration;
1274+
const configuration = this.configuration;
12751275
const stream = require('stream');
12761276
const client = configuration.newClient();
12771277

12781278
client.connect(function(err, client) {
12791279
assert.ifError(err);
12801280

1281-
var theDatabase = client.db('integration_tests');
1282-
var theCollection = theDatabase.collection('pipeTest');
1283-
var thisChangeStream = theCollection.watch(pipeline);
1281+
const theDatabase = client.db('integration_tests');
1282+
const theCollection = theDatabase.collection('pipeTest');
1283+
const thisChangeStream = theCollection.watch(pipeline);
12841284

1285-
var outStream = new stream.PassThrough({ objectMode: true });
1285+
const outStream = new stream.PassThrough({ objectMode: true });
12861286

12871287
// Make a stream transforming to JSON and piping to the file
12881288
thisChangeStream.stream({ transform: JSON.stringify }).pipe(outStream);
@@ -1294,7 +1294,7 @@ describe('Change Streams', function() {
12941294
outStream
12951295
.on('data', data => {
12961296
try {
1297-
var parsedEvent = JSON.parse(data);
1297+
const parsedEvent = JSON.parse(data);
12981298
assert.equal(parsedEvent.fullDocument.a, 1);
12991299
close();
13001300
} catch (e) {

0 commit comments

Comments
 (0)