Skip to content

Commit e102f14

Browse files
committed
test(NODE-7196): migrate to typescript
1 parent cc85ebf commit e102f14

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
'use strict';
2-
const semver = require('semver');
3-
const { assert: test, setupDatabase } = require('../shared');
4-
const { expect } = require('chai');
1+
import { expect } from 'chai';
2+
import * as semver from 'semver';
53

6-
describe('Unicode', function () {
4+
import { assert as test, setupDatabase } from '../shared';
5+
6+
describe.only('Unicode', function () {
77
before(function () {
88
return setupDatabase(this.configuration);
99
});
@@ -19,11 +19,11 @@ describe('Unicode', function () {
1919
this.skip();
2020
}
2121

22-
var configuration = this.configuration;
23-
var client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
22+
const configuration = this.configuration;
23+
const client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
2424
client.connect(function (err, client) {
25-
var db = client.db(configuration.db);
26-
var doc = {
25+
const db = client.db(configuration.db);
26+
const doc = {
2727
statuses_count: 1687,
2828
created_at: 'Mon Oct 22 14:55:08 +0000 2007',
2929
description: 'NodeJS hacker, Cofounder of Debuggable, CakePHP core alumnus',
@@ -120,12 +120,12 @@ describe('Unicode', function () {
120120
},
121121

122122
test: function (done) {
123-
var object = { 客家话: 'Hello' };
123+
const object = { 客家话: 'Hello' };
124124

125-
var configuration = this.configuration;
126-
var client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
125+
const configuration = this.configuration;
126+
const client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
127127
client.connect(function (err, client) {
128-
var db = client.db(configuration.db);
128+
const db = client.db(configuration.db);
129129
db.createCollection('create_object_with_chinese_object_name', function (err) {
130130
expect(err).to.not.exist;
131131
const collection = db.collection('create_object_with_chinese_object_name');
@@ -151,10 +151,10 @@ describe('Unicode', function () {
151151
},
152152

153153
test: function (done) {
154-
var configuration = this.configuration;
155-
var client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
154+
const configuration = this.configuration;
155+
const client = configuration.newClient(configuration.writeConcernMax(), { maxPoolSize: 1 });
156156
client.connect(function (err, client) {
157-
var db = client.db(configuration.db);
157+
const db = client.db(configuration.db);
158158
db.createCollection('test_utf8_key_name', function (err, collection) {
159159
collection.insert({ šđžčćŠĐŽČĆ: 1 }, { writeConcern: { w: 1 } }, function (err) {
160160
expect(err).to.not.exist;

0 commit comments

Comments
 (0)