From 1089469e10d894d97624476b01a2bc2091dd6a66 Mon Sep 17 00:00:00 2001 From: hanquliu Date: Fri, 27 Dec 2024 16:12:04 +0800 Subject: [PATCH 1/3] test: migrated base.test.js from tap to node:test --- test/basic.test.js | 192 +++++++++++++++++++++++++-------------------- 1 file changed, 106 insertions(+), 86 deletions(-) diff --git a/test/basic.test.js b/test/basic.test.js index 05a4810..6cf8e1b 100644 --- a/test/basic.test.js +++ b/test/basic.test.js @@ -1,174 +1,183 @@ 'use strict' -const { test } = require('tap') +const { test } = require('node:test') const boot = require('..') -test('boot an empty app', (t) => { +test('boot an empty app', (t, done_) => { t.plan(1) const app = boot() app.on('start', () => { - t.pass('booted') + t.assert.ok(true, 'booted') + done_() }) }) -test('start returns app', (t) => { +test('start returns app', (t, done_) => { t.plan(1) const app = boot({}, { autostart: false }) app .start() .ready((err) => { - t.error(err) + t.assert.ifError(err) + done_() }) }) -test('boot an app with a plugin', (t) => { +test('boot an app with a plugin', (t, done_) => { t.plan(4) const app = boot() let after = false app.use(function (server, opts, done) { - t.equal(server, app, 'the first argument is the server') - t.same(opts, {}, 'no options') - t.ok(after, 'delayed execution') + t.assert.deepStrictEqual(server, app, 'the first argument is the server') + t.assert.deepStrictEqual(opts, {}, 'no options') + t.assert.ok(after, 'delayed execution') done() }) after = true app.on('start', () => { - t.pass('booted') + t.assert.ok(true, 'booted') + done_() }) }) -test('boot an app with a promisified plugin', (t) => { +test('boot an app with a promisified plugin', (t, done_) => { t.plan(4) const app = boot() let after = false app.use(function (server, opts) { - t.equal(server, app, 'the first argument is the server') - t.same(opts, {}, 'no options') - t.ok(after, 'delayed execution') + t.assert.deepStrictEqual(server, app, 'the first argument is the server') + t.assert.deepStrictEqual(opts, {}, 'no options') + t.assert.ok(after, 'delayed execution') return Promise.resolve() }) after = true app.on('start', () => { - t.pass('booted') + t.assert.ok(true, 'booted') + done_() }) }) -test('boot an app with a plugin and a callback /1', (t) => { +test('boot an app with a plugin and a callback /1', (t, done_) => { t.plan(2) const app = boot(() => { - t.pass('booted') + t.assert.ok(true, 'booted') }) app.use(function (server, opts, done) { - t.pass('plugin loaded') + t.assert.ok(true, 'plugin loaded') done() + done_() }) }) -test('boot an app with a plugin and a callback /2', (t) => { +test('boot an app with a plugin and a callback /2', (t, done_) => { t.plan(2) const app = boot({}, () => { - t.pass('booted') + t.assert.ok(true, 'booted') }) app.use(function (server, opts, done) { - t.pass('plugin loaded') + t.assert.ok(true, 'plugin loaded') done() + done_() }) }) -test('boot a plugin with a custom server', (t) => { +test('boot a plugin with a custom server', (t, done_) => { t.plan(4) const server = {} const app = boot(server) app.use(function (s, opts, done) { - t.equal(s, server, 'the first argument is the server') - t.same(opts, {}, 'no options') + t.assert.deepStrictEqual(s, server, 'the first argument is the server') + t.assert.deepStrictEqual(opts, {}, 'no options') done() }) app.onClose(() => { - t.ok('onClose called') + t.assert.ok(true, 'onClose called') + done_() }) app.on('start', () => { app.close(() => { - t.pass('booted') + t.assert.ok(true, 'booted') }) }) }) -test('custom instance should inherits avvio methods /1', (t) => { +test('custom instance should inherits avvio methods /1', (t, done_) => { t.plan(6) const server = {} const app = boot(server, {}) server.use(function (s, opts, done) { - t.equal(s, server, 'the first argument is the server') - t.same(opts, {}, 'no options') + t.assert.deepStrictEqual(s, server, 'the first argument is the server') + t.assert.deepStrictEqual(opts, {}, 'no options') done() }).after(() => { - t.ok('after called') + t.assert.ok(true, 'after called') }) server.onClose(() => { - t.ok('onClose called') + t.assert.ok(true, 'onClose called') + done_() }) server.ready(() => { - t.ok('ready called') + t.assert.ok(true, 'ready called') }) app.on('start', () => { server.close(() => { - t.pass('booted') + t.assert.ok(true, 'booted') }) }) }) -test('custom instance should inherits avvio methods /2', (t) => { +test('custom instance should inherits avvio methods /2', (t, done_) => { t.plan(6) const server = {} const app = new boot(server, {}) // eslint-disable-line new-cap server.use(function (s, opts, done) { - t.equal(s, server, 'the first argument is the server') - t.same(opts, {}, 'no options') + t.assert.deepStrictEqual(s, server, 'the first argument is the server') + t.assert.deepStrictEqual(opts, {}, 'no options') done() }).after(() => { - t.ok('after called') + t.assert.ok(true, 'after called') }) server.onClose(() => { - t.ok('onClose called') + t.assert.ok(true, 'onClose called') + done_() }) server.ready(() => { - t.ok('ready called') + t.assert.ok(true, 'ready called') }) app.on('start', () => { server.close(() => { - t.pass('booted') + t.assert.ok(true, 'booted') }) }) }) -test('boot a plugin with options', (t) => { +test('boot a plugin with options', (t, done_) => { t.plan(3) const server = {} @@ -178,17 +187,18 @@ test('boot a plugin with options', (t) => { } app.use(function (s, opts, done) { - t.equal(s, server, 'the first argument is the server') - t.same(opts, myOpts, 'passed options') + t.assert.deepStrictEqual(s, server, 'the first argument is the server') + t.assert.deepStrictEqual(opts, myOpts, 'passed options') done() }, myOpts) app.on('start', () => { - t.pass('booted') + t.assert.ok(true, 'booted') + done_() }) }) -test('boot a plugin with a function that returns the options', (t) => { +test('boot a plugin with a function that returns the options', (t, done_) => { t.plan(4) const server = {} @@ -197,7 +207,7 @@ test('boot a plugin with a function that returns the options', (t) => { hello: 'world' } const myOptsAsFunc = parent => { - t.equal(parent, server) + t.assert.deepStrictEqual(parent, server) return parent.myOpts } @@ -207,46 +217,47 @@ test('boot a plugin with a function that returns the options', (t) => { }, myOpts) app.use(function (s, opts, done) { - t.equal(s, server, 'the first argument is the server') - t.same(opts, myOpts, 'passed options via function accessing parent injected variable') + t.assert.deepStrictEqual(s, server, 'the first argument is the server') + t.assert.deepStrictEqual(opts, myOpts, 'passed options via function accessing parent injected variable') done() }, myOptsAsFunc) app.on('start', () => { - t.pass('booted') + t.assert.ok(true, 'booted') + done_() }) }) test('throw on non-function use', (t) => { t.plan(1) const app = boot() - t.throws(() => { + t.assert.throws(() => { app.use({}) }) }) // https://github.com/mcollina/avvio/issues/20 -test('ready and nextTick', (t) => { +test('ready and nextTick', (t, done_) => { const app = boot() process.nextTick(() => { app.ready(() => { - t.end() + done_() }) }) }) // https://github.com/mcollina/avvio/issues/20 -test('promises and microtask', (t) => { +test('promises and microtask', (t, done_) => { const app = boot() Promise.resolve() .then(() => { app.ready(function () { - t.end() + done_() }) }) }) -test('always loads nested plugins after the current one', (t) => { +test('always loads nested plugins after the current one', (t, done_) => { t.plan(2) const server = {} @@ -259,31 +270,33 @@ test('always loads nested plugins after the current one', (t) => { second = true done() }) - t.notOk(second) + t.assert.ok(!second) done() }) app.on('start', () => { - t.ok(second) + t.assert.ok(true, second) + done_() }) }) -test('promise long resolve', (t) => { +test('promise long resolve', (t, done_) => { t.plan(2) const app = boot() setTimeout(function () { - t.throws(() => { + t.assert.throws(() => { app.use((s, opts, done) => { done() }) }, 'root plugin has already booted') + done_() }) app.ready(function (err) { - t.notOk(err) + t.assert.ok(!err) }) }) @@ -292,12 +305,11 @@ test('do not autostart', (t) => { autostart: false }) app.on('start', () => { - t.fail() + t.assert.fail() }) - t.end() }) -test('start with ready', (t) => { +test('start with ready', (t, done_) => { t.plan(2) const app = boot(null, { @@ -305,15 +317,16 @@ test('start with ready', (t) => { }) app.on('start', () => { - t.pass() + t.assert.ok(true) + done_() }) app.ready(function (err) { - t.error(err) + t.assert.ifError(err) }) }) -test('load a plugin after start()', (t) => { +test('load a plugin after start()', (t, done_) => { t.plan(1) let startCalled = false @@ -322,8 +335,9 @@ test('load a plugin after start()', (t) => { }) app.use((s, opts, done) => { - t.ok(startCalled) + t.assert.ok(startCalled) done() + done_() }) // we use a timer because @@ -337,18 +351,19 @@ test('load a plugin after start()', (t) => { }, 2) }) -test('booted should be set before ready', (t) => { +test('booted should be set before ready', (t, done_) => { t.plan(2) const app = boot() app.ready(function (err) { - t.error(err) - t.equal(app.booted, true) + t.assert.ifError(err) + t.assert.ok(app.booted) + done_() }) }) -test('start should be emitted after ready resolves', (t) => { +test('start should be emitted after ready resolves', (t, done_) => { t.plan(1) const app = boot() @@ -359,23 +374,25 @@ test('start should be emitted after ready resolves', (t) => { }) app.on('start', function () { - t.equal(ready, true) + t.assert.ok(ready) + done_() }) }) -test('throws correctly if registering after ready', (t) => { +test('throws correctly if registering after ready', (t, done_) => { t.plan(1) const app = boot() app.ready(function () { - t.throws(() => { + t.assert.throws(() => { app.use((a, b, done) => done()) }, 'root plugin has already booted') + done_() }) }) -test('preReady errors must be managed', (t) => { +test('preReady errors must be managed', (t, done_) => { t.plan(2) const app = boot() @@ -389,12 +406,13 @@ test('preReady errors must be managed', (t) => { }) app.ready(err => { - t.pass('ready function is called') - t.equal(err.message, 'boom') + t.assert.ok(true, 'ready function is called') + t.assert.equal(err.message, 'boom') + done_() }) }) -test('preReady errors do not override plugin\'s errors', (t) => { +test('preReady errors do not override plugin\'s errors', (t, done_) => { t.plan(3) const app = boot() @@ -404,17 +422,18 @@ test('preReady errors do not override plugin\'s errors', (t) => { }) app.on('preReady', () => { - t.pass('preReady is executed') + t.assert.ok(true, 'preReady is executed') throw new Error('boom') }) app.ready(err => { - t.pass('ready function is called') - t.equal(err.message, 'baam') + t.assert.ok(true, 'ready function is called') + t.assert.equal(err.message, 'baam') + done_() }) }) -test('support faux modules', (t) => { +test('support faux modules', (t, done_) => { t.plan(4) const app = boot() @@ -424,9 +443,9 @@ test('support faux modules', (t) => { // or Babel that they export a .default property. app.use({ default: function (server, opts, done) { - t.equal(server, app, 'the first argument is the server') - t.same(opts, {}, 'no options') - t.ok(after, 'delayed execution') + t.assert.deepStrictEqual(server, app, 'the first argument is the server') + t.assert.deepStrictEqual(opts, {}, 'no options') + t.assert.ok(true, after, 'delayed execution') done() } }) @@ -434,6 +453,7 @@ test('support faux modules', (t) => { after = true app.on('start', () => { - t.pass('booted') + t.assert.ok(true, 'booted') + done_() }) }) From 328fb9e329f47f513ba17ed311c2203a385c1fbe Mon Sep 17 00:00:00 2001 From: hanquliu Date: Fri, 27 Dec 2024 16:42:33 +0800 Subject: [PATCH 2/3] Replace `done_` with `testCompleted` --- test/basic.test.js | 92 +++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/test/basic.test.js b/test/basic.test.js index 6cf8e1b..9a56e4f 100644 --- a/test/basic.test.js +++ b/test/basic.test.js @@ -3,27 +3,27 @@ const { test } = require('node:test') const boot = require('..') -test('boot an empty app', (t, done_) => { +test('boot an empty app', (t, testCompleted) => { t.plan(1) const app = boot() app.on('start', () => { t.assert.ok(true, 'booted') - done_() + testCompleted() }) }) -test('start returns app', (t, done_) => { +test('start returns app', (t, testCompleted) => { t.plan(1) const app = boot({}, { autostart: false }) app .start() .ready((err) => { t.assert.ifError(err) - done_() + testCompleted() }) }) -test('boot an app with a plugin', (t, done_) => { +test('boot an app with a plugin', (t, testCompleted) => { t.plan(4) const app = boot() @@ -40,11 +40,11 @@ test('boot an app with a plugin', (t, done_) => { app.on('start', () => { t.assert.ok(true, 'booted') - done_() + testCompleted() }) }) -test('boot an app with a promisified plugin', (t, done_) => { +test('boot an app with a promisified plugin', (t, testCompleted) => { t.plan(4) const app = boot() @@ -61,11 +61,11 @@ test('boot an app with a promisified plugin', (t, done_) => { app.on('start', () => { t.assert.ok(true, 'booted') - done_() + testCompleted() }) }) -test('boot an app with a plugin and a callback /1', (t, done_) => { +test('boot an app with a plugin and a callback /1', (t, testCompleted) => { t.plan(2) const app = boot(() => { @@ -75,11 +75,11 @@ test('boot an app with a plugin and a callback /1', (t, done_) => { app.use(function (server, opts, done) { t.assert.ok(true, 'plugin loaded') done() - done_() + testCompleted() }) }) -test('boot an app with a plugin and a callback /2', (t, done_) => { +test('boot an app with a plugin and a callback /2', (t, testCompleted) => { t.plan(2) const app = boot({}, () => { @@ -89,11 +89,11 @@ test('boot an app with a plugin and a callback /2', (t, done_) => { app.use(function (server, opts, done) { t.assert.ok(true, 'plugin loaded') done() - done_() + testCompleted() }) }) -test('boot a plugin with a custom server', (t, done_) => { +test('boot a plugin with a custom server', (t, testCompleted) => { t.plan(4) const server = {} @@ -107,7 +107,7 @@ test('boot a plugin with a custom server', (t, done_) => { app.onClose(() => { t.assert.ok(true, 'onClose called') - done_() + testCompleted() }) app.on('start', () => { @@ -117,7 +117,7 @@ test('boot a plugin with a custom server', (t, done_) => { }) }) -test('custom instance should inherits avvio methods /1', (t, done_) => { +test('custom instance should inherits avvio methods /1', (t, testCompleted) => { t.plan(6) const server = {} @@ -133,7 +133,7 @@ test('custom instance should inherits avvio methods /1', (t, done_) => { server.onClose(() => { t.assert.ok(true, 'onClose called') - done_() + testCompleted() }) server.ready(() => { @@ -147,7 +147,7 @@ test('custom instance should inherits avvio methods /1', (t, done_) => { }) }) -test('custom instance should inherits avvio methods /2', (t, done_) => { +test('custom instance should inherits avvio methods /2', (t, testCompleted) => { t.plan(6) const server = {} @@ -163,7 +163,7 @@ test('custom instance should inherits avvio methods /2', (t, done_) => { server.onClose(() => { t.assert.ok(true, 'onClose called') - done_() + testCompleted() }) server.ready(() => { @@ -177,7 +177,7 @@ test('custom instance should inherits avvio methods /2', (t, done_) => { }) }) -test('boot a plugin with options', (t, done_) => { +test('boot a plugin with options', (t, testCompleted) => { t.plan(3) const server = {} @@ -194,11 +194,11 @@ test('boot a plugin with options', (t, done_) => { app.on('start', () => { t.assert.ok(true, 'booted') - done_() + testCompleted() }) }) -test('boot a plugin with a function that returns the options', (t, done_) => { +test('boot a plugin with a function that returns the options', (t, testCompleted) => { t.plan(4) const server = {} @@ -224,7 +224,7 @@ test('boot a plugin with a function that returns the options', (t, done_) => { app.on('start', () => { t.assert.ok(true, 'booted') - done_() + testCompleted() }) }) @@ -237,27 +237,27 @@ test('throw on non-function use', (t) => { }) // https://github.com/mcollina/avvio/issues/20 -test('ready and nextTick', (t, done_) => { +test('ready and nextTick', (t, testCompleted) => { const app = boot() process.nextTick(() => { app.ready(() => { - done_() + testCompleted() }) }) }) // https://github.com/mcollina/avvio/issues/20 -test('promises and microtask', (t, done_) => { +test('promises and microtask', (t, testCompleted) => { const app = boot() Promise.resolve() .then(() => { app.ready(function () { - done_() + testCompleted() }) }) }) -test('always loads nested plugins after the current one', (t, done_) => { +test('always loads nested plugins after the current one', (t, testCompleted) => { t.plan(2) const server = {} @@ -277,11 +277,11 @@ test('always loads nested plugins after the current one', (t, done_) => { app.on('start', () => { t.assert.ok(true, second) - done_() + testCompleted() }) }) -test('promise long resolve', (t, done_) => { +test('promise long resolve', (t, testCompleted) => { t.plan(2) const app = boot() @@ -292,7 +292,7 @@ test('promise long resolve', (t, done_) => { done() }) }, 'root plugin has already booted') - done_() + testCompleted() }) app.ready(function (err) { @@ -309,7 +309,7 @@ test('do not autostart', (t) => { }) }) -test('start with ready', (t, done_) => { +test('start with ready', (t, testCompleted) => { t.plan(2) const app = boot(null, { @@ -318,7 +318,7 @@ test('start with ready', (t, done_) => { app.on('start', () => { t.assert.ok(true) - done_() + testCompleted() }) app.ready(function (err) { @@ -326,7 +326,7 @@ test('start with ready', (t, done_) => { }) }) -test('load a plugin after start()', (t, done_) => { +test('load a plugin after start()', (t, testCompleted) => { t.plan(1) let startCalled = false @@ -337,7 +337,7 @@ test('load a plugin after start()', (t, done_) => { app.use((s, opts, done) => { t.assert.ok(startCalled) done() - done_() + testCompleted() }) // we use a timer because @@ -351,7 +351,7 @@ test('load a plugin after start()', (t, done_) => { }, 2) }) -test('booted should be set before ready', (t, done_) => { +test('booted should be set before ready', (t, testCompleted) => { t.plan(2) const app = boot() @@ -359,11 +359,11 @@ test('booted should be set before ready', (t, done_) => { app.ready(function (err) { t.assert.ifError(err) t.assert.ok(app.booted) - done_() + testCompleted() }) }) -test('start should be emitted after ready resolves', (t, done_) => { +test('start should be emitted after ready resolves', (t, testCompleted) => { t.plan(1) const app = boot() @@ -375,11 +375,11 @@ test('start should be emitted after ready resolves', (t, done_) => { app.on('start', function () { t.assert.ok(ready) - done_() + testCompleted() }) }) -test('throws correctly if registering after ready', (t, done_) => { +test('throws correctly if registering after ready', (t, testCompleted) => { t.plan(1) const app = boot() @@ -388,11 +388,11 @@ test('throws correctly if registering after ready', (t, done_) => { t.assert.throws(() => { app.use((a, b, done) => done()) }, 'root plugin has already booted') - done_() + testCompleted() }) }) -test('preReady errors must be managed', (t, done_) => { +test('preReady errors must be managed', (t, testCompleted) => { t.plan(2) const app = boot() @@ -408,11 +408,11 @@ test('preReady errors must be managed', (t, done_) => { app.ready(err => { t.assert.ok(true, 'ready function is called') t.assert.equal(err.message, 'boom') - done_() + testCompleted() }) }) -test('preReady errors do not override plugin\'s errors', (t, done_) => { +test('preReady errors do not override plugin\'s errors', (t, testCompleted) => { t.plan(3) const app = boot() @@ -429,11 +429,11 @@ test('preReady errors do not override plugin\'s errors', (t, done_) => { app.ready(err => { t.assert.ok(true, 'ready function is called') t.assert.equal(err.message, 'baam') - done_() + testCompleted() }) }) -test('support faux modules', (t, done_) => { +test('support faux modules', (t, testCompleted) => { t.plan(4) const app = boot() @@ -454,6 +454,6 @@ test('support faux modules', (t, done_) => { app.on('start', () => { t.assert.ok(true, 'booted') - done_() + testCompleted() }) }) From dbf310a7d200a703c3a7e2a168b0aa49f30dcdce Mon Sep 17 00:00:00 2001 From: hanquliu Date: Tue, 31 Dec 2024 18:00:14 +0800 Subject: [PATCH 3/3] test: migrated callbacks.test.js from tap to node:test --- test/callbacks.test.js | 49 ++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/test/callbacks.test.js b/test/callbacks.test.js index 2e7ac1c..3ae90bd 100644 --- a/test/callbacks.test.js +++ b/test/callbacks.test.js @@ -1,9 +1,9 @@ 'use strict' -const { test } = require('tap') +const { test } = require('node:test') const boot = require('..') -test('reentrant', (t) => { +test('reentrant', (t, testCompleted) => { t.plan(7) const app = boot() @@ -13,28 +13,29 @@ test('reentrant', (t) => { app .use(first) .after(() => { - t.ok(firstLoaded, 'first is loaded') - t.ok(secondLoaded, 'second is loaded') - t.pass('booted') + t.assert.ok(firstLoaded, 'first is loaded') + t.assert.ok(secondLoaded, 'second is loaded') + t.assert.ok(true) + testCompleted() }) function first (s, opts, done) { - t.notOk(firstLoaded, 'first is not loaded') - t.notOk(secondLoaded, 'second is not loaded') + t.assert.strictEqual(firstLoaded, false, 'first is not loaded') + t.assert.strictEqual(secondLoaded, false, 'second is not loaded') firstLoaded = true s.use(second) done() } function second (s, opts, done) { - t.ok(firstLoaded, 'first is loaded') - t.notOk(secondLoaded, 'second is not loaded') + t.assert.ok(firstLoaded, 'first is loaded') + t.assert.strictEqual(secondLoaded, false, 'second is not loaded') secondLoaded = true done() } }) -test('reentrant with callbacks deferred', (t) => { +test('reentrant with callbacks deferred', (t, testCompleted) => { t.plan(11) const app = boot() @@ -45,25 +46,26 @@ test('reentrant with callbacks deferred', (t) => { app.use(first) function first (s, opts, done) { - t.notOk(firstLoaded, 'first is not loaded') - t.notOk(secondLoaded, 'second is not loaded') - t.notOk(thirdLoaded, 'third is not loaded') + t.assert.strictEqual(firstLoaded, false, 'first is not loaded') + t.assert.strictEqual(secondLoaded, false, 'second is not loaded') + t.assert.strictEqual(thirdLoaded, false, 'third is not loaded') firstLoaded = true s.use(second) setTimeout(() => { try { s.use(third) } catch (err) { - t.equal(err.message, 'Root plugin has already booted') + t.assert.strictEqual(err.message, 'Root plugin has already booted') } + testCompleted() }, 500) done() } function second (s, opts, done) { - t.ok(firstLoaded, 'first is loaded') - t.notOk(secondLoaded, 'second is not loaded') - t.notOk(thirdLoaded, 'third is not loaded') + t.assert.ok(firstLoaded, 'first is loaded') + t.assert.strictEqual(secondLoaded, false, 'second is not loaded') + t.assert.strictEqual(thirdLoaded, false, 'third is not loaded') secondLoaded = true done() } @@ -74,14 +76,14 @@ test('reentrant with callbacks deferred', (t) => { } app.on('start', () => { - t.ok(firstLoaded, 'first is loaded') - t.ok(secondLoaded, 'second is loaded') - t.notOk(thirdLoaded, 'third is not loaded') - t.pass('booted') + t.assert.ok(firstLoaded, 'first is loaded') + t.assert.ok(secondLoaded, 'second is loaded') + t.assert.strictEqual(thirdLoaded, false, 'third is not loaded') + t.assert.ok(true) }) }) -test('multiple loading time', t => { +test('multiple loading time', (t, testCompleted) => { t.plan(1) const app = boot() @@ -108,6 +110,7 @@ test('multiple loading time', t => { setTimeout(done, 0) }) .after(() => { - t.pass('booted') + t.assert.ok(true) + testCompleted() }) })