Skip to content

Commit b228f44

Browse files
committed
rebase fixes
1 parent f0fb9d5 commit b228f44

File tree

3 files changed

+25
-35
lines changed

3 files changed

+25
-35
lines changed

test/functional/find.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,8 +1337,8 @@ describe('Find', function () {
13371337
) {
13381338
var _lowerId = new ObjectId();
13391339
var _higherId = new ObjectId();
1340-
var lowerId = new Long.fromString('133118461172916224', 10);
1341-
var higherId = new Long.fromString('133118461172916225', 10);
1340+
var lowerId = Long.fromString('133118461172916224', 10);
1341+
var higherId = Long.fromString('133118461172916225', 10);
13421342

13431343
var lowerDoc = { _id: _lowerId, id: lowerId };
13441344
var higherDoc = { _id: _higherId, id: higherId };

test/functional/insert.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,11 +710,11 @@ describe('Insert', function () {
710710
collection.find().toArray(function (err, items) {
711711
test.equal('shouldCorrectlyInsertDBRefWithDbNotDefined', items[1].ref.namespace);
712712
test.equal(doc._id.toString(), items[1].ref.oid.toString());
713-
expect(items[1].ref.db).to.be.null;
713+
expect(items[1].ref.db).to.not.exist;
714714

715715
test.equal('shouldCorrectlyInsertDBRefWithDbNotDefined', items[2].ref.namespace);
716716
test.equal(doc._id.toString(), items[2].ref.oid.toString());
717-
expect(items[2].ref.db).to.be.null;
717+
expect(items[2].ref.db).to.not.exist;
718718

719719
client.close(done);
720720
});

test/functional/unicode.test.js

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -79,43 +79,33 @@ describe('Unicode', function () {
7979
}
8080
});
8181

82-
it('shouldCorrectlyInsertUnicodeCharacters', {
83-
metadata: {
84-
requires: { topology: ['single', 'replicaset', 'sharded', 'ssl', 'heap', 'wiredtiger'] }
85-
},
86-
87-
test: function (done) {
88-
var configuration = this.configuration;
89-
var client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
90-
client.connect(function (err, client) {
82+
it('should Correctly Insert Unicode Characters', function (done) {
83+
const client = this.configuration.newClient(this.configuration.writeConcernMax(), {
84+
maxPoolSize: 1
85+
});
86+
client.connect((err, client) => {
87+
expect(err).to.not.exist;
88+
const db = client.db(this.configuration.db);
89+
db.createCollection('unicode_test_collection', (err, collection) => {
9190
expect(err).to.not.exist;
92-
var db = client.db(configuration.db);
93-
db.createCollection('unicode_test_collection', function (err, collection) {
94-
var test_strings = ['ouooueauiOUOOUEAUI', 'öüóőúéáűíÖÜÓŐÚÉÁŰÍ', '本荘由利地域に洪水警報'];
95-
collection.insert({ id: 0, text: test_strings[0] }, { writeConcern: { w: 1 } }, function (
96-
err
97-
) {
91+
const test_strings = ['ouooueauiOUOOUEAUI', 'öüóőúéáűíÖÜÓŐÚÉÁŰÍ', '本荘由利地域に洪水警報'];
92+
collection.insert({ id: 0, text: test_strings[0] }, { writeConcern: { w: 1 } }, err => {
93+
expect(err).to.not.exist;
94+
collection.insert({ id: 1, text: test_strings[1] }, { writeConcern: { w: 1 } }, err => {
9895
expect(err).to.not.exist;
99-
collection.insert(
100-
{ id: 1, text: test_strings[1] },
101-
{ writeConcern: { w: 1 } },
102-
function (err) {
96+
collection.find().forEach(
97+
doc => {
98+
expect(doc).property('text').to.equal(test_strings[doc.id]);
99+
},
100+
err => {
103101
expect(err).to.not.exist;
104-
collection.find().forEach(
105-
doc => {
106-
expect(doc).property('text').to.equal(test_strings[doc.id]);
107-
},
108-
err => {
109-
expect(err).to.not.exist;
110-
client.close(done);
111-
}
112-
);
113-
});
114-
});
102+
client.close(done);
103+
}
104+
);
115105
});
116106
});
117107
});
118-
}
108+
});
119109
});
120110

121111
it('shouldCreateObjectWithChineseObjectName', {

0 commit comments

Comments
 (0)