We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2bd2c3a commit 1a7a7f7Copy full SHA for 1a7a7f7
1 file changed
test/integration/crud/promise_stats.test.js
@@ -15,7 +15,7 @@ describe('stats', function () {
15
}
16
},
17
18
- test: function (done) {
+ test: async function () {
19
var configuration = this.configuration;
20
var url = configuration.url();
21
url =
@@ -24,16 +24,10 @@ describe('stats', function () {
24
: f('%s?%s', url, 'maxPoolSize=5');
25
26
const client = configuration.newClient(url);
27
- client.connect().then(function (client) {
28
- client
29
- .db(configuration.db)
30
- .stats()
31
- .then(function (stats) {
32
- test.ok(stats != null);
33
-
34
- client.close(done);
35
- });
36
+ await client.connect();
+ const stats = await client.db(configuration.db).stats();
+ test.notEqual(null, stats);
+ await client.close();
37
38
});
39
0 commit comments