From 673681283a9a9373646ce56ce08cc635bddc036e Mon Sep 17 00:00:00 2001 From: Dmytro Nechai Date: Thu, 9 Mar 2023 21:52:48 +0200 Subject: [PATCH] Add test udpates --- impress.js | 5 ++++- lib/dependencies.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/impress.js b/impress.js index 49e3329ed..69c74b1be 100644 --- a/impress.js +++ b/impress.js @@ -26,7 +26,10 @@ const impress = { logger: null, config: null, planner: null, - close: () => {}, + close: async () => { + if (impress.logger?.active) await impress.logger.close(); + process.exit(1); + }, finalization: false, initialization: true, console, diff --git a/lib/dependencies.js b/lib/dependencies.js index 1bbec42e4..233872bf5 100644 --- a/lib/dependencies.js +++ b/lib/dependencies.js @@ -7,7 +7,8 @@ const npm = {}; const metarhia = {}; const system = ['util', 'child_process', 'os', 'v8', 'vm']; -const tools = ['path', 'url', 'string_decoder', 'querystring', 'assert']; +const tools = + ['path', 'url', 'string_decoder', 'querystring', 'assert', 'node:test']; const streams = ['stream', 'fs', 'crypto', 'zlib', 'readline']; const async = ['perf_hooks', 'async_hooks', 'timers', 'events']; const network = ['dns', 'net', 'tls', 'http', 'https', 'http2', 'dgram']; @@ -67,6 +68,7 @@ node.childProcess = node['child_process']; node.StringDecoder = node['string_decoder']; node.perfHooks = node['perf_hooks']; node.asyncHooks = node['async_hooks']; +node.test = node['node:test']; node.fsp = node.fs.promises; Object.freeze(node);