Skip to content

Commit

Permalink
tests: Reduce the polyfills used in webpack
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
thgreasi committed Aug 9, 2023
1 parent 0494434 commit 361957f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit 361957f

Please sign in to comment.