From 361957f52c1bf7b5d770eb8098cfc03fbeedbaa1 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 25 Jul 2023 19:49:09 +0300 Subject: [PATCH] tests: Reduce the polyfills used in webpack Change-type: patch --- karma.conf.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 5625b8139..388dd1d47 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -24,18 +24,23 @@ module.exports = function (config) { const karmaConfig = getKarmaConfig(packageJSON); karmaConfig.webpack.resolve.fallback = { + // required by: temp in tests constants: false, + // required by: mockttp in tests crypto: require.resolve('crypto-browserify'), + // required by: mocha.parallel in tests domain: require.resolve('domain-browser'), - dns: false, + // used conditionally in the tests fs: false, - net: false, + // required by: ndjson os: require.resolve('os-browserify'), + // used conditionally in the tests path: false, + // required by: mockttp in tests querystring: require.resolve('querystring-es3'), + // required by: balena-request stream: require.resolve('stream-browserify'), - url: false, - util: require.resolve('util'), + // required by: balena-request zlib: require.resolve('browserify-zlib'), }; karmaConfig.webpack.plugins = [