diff --git a/jasmine-global-variables.js b/jasmine-global-variables.js new file mode 100644 index 0000000000..4e06d84714 --- /dev/null +++ b/jasmine-global-variables.js @@ -0,0 +1,13 @@ +const process = { + ...process, + env: { + ...process.env, + HTTPSERVER_ENABLED: 1, + SIMAPP44_ENABLED: 1, + SLOW_SIMAPP44_ENABLED: 1, + TENDERMINT_ENABLED: 1, + SOCKETSERVER_ENABLED: 1, + SKIP_BUILD: 1, + WASMD_ENABLED: 1 + } +}; \ No newline at end of file diff --git a/packages/amino/karma.conf.js b/packages/amino/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/amino/karma.conf.js +++ b/packages/amino/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/cosmwasm-stargate/global-variables.js b/packages/cosmwasm-stargate/global-variables.js deleted file mode 100644 index fdf77db086..0000000000 --- a/packages/cosmwasm-stargate/global-variables.js +++ /dev/null @@ -1,5 +0,0 @@ -const process = { - env: { - TENDERMINT_ENABLED: 1, - } -}; \ No newline at end of file diff --git a/packages/cosmwasm-stargate/karma.conf.js b/packages/cosmwasm-stargate/karma.conf.js index e13315aadc..711ab471cc 100644 --- a/packages/cosmwasm-stargate/karma.conf.js +++ b/packages/cosmwasm-stargate/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["./global-variables.js", "dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { @@ -50,13 +50,5 @@ module.exports = function (config) { // Keep brower open for debugging. This is overridden by yarn scripts singleRun: false, - - webpack: { - plugins: [ - new webpack.ProvidePlugin({ - process: 'process/browser' - }) - ] - } }); }; diff --git a/packages/crypto/karma.conf.js b/packages/crypto/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/crypto/karma.conf.js +++ b/packages/crypto/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/encoding/karma.conf.js b/packages/encoding/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/encoding/karma.conf.js +++ b/packages/encoding/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/faucet-client/karma.conf.js b/packages/faucet-client/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/faucet-client/karma.conf.js +++ b/packages/faucet-client/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/math/karma.conf.js b/packages/math/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/math/karma.conf.js +++ b/packages/math/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/proto-signing/karma.conf.js b/packages/proto-signing/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/proto-signing/karma.conf.js +++ b/packages/proto-signing/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/socket/karma.conf.js b/packages/socket/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/socket/karma.conf.js +++ b/packages/socket/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/stargate/global-variables.js b/packages/stargate/global-variables.js deleted file mode 100644 index fdf77db086..0000000000 --- a/packages/stargate/global-variables.js +++ /dev/null @@ -1,5 +0,0 @@ -const process = { - env: { - TENDERMINT_ENABLED: 1, - } -}; \ No newline at end of file diff --git a/packages/stargate/karma.conf.js b/packages/stargate/karma.conf.js index c8e74820fb..711ab471cc 100644 --- a/packages/stargate/karma.conf.js +++ b/packages/stargate/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["./global-variables.js", "dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/stream/karma.conf.js b/packages/stream/karma.conf.js index 31c44e8edf..711ab471cc 100644 --- a/packages/stream/karma.conf.js +++ b/packages/stream/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/tendermint-rpc/karma.conf.js b/packages/tendermint-rpc/karma.conf.js index 9ee4e92603..75cd1626f6 100644 --- a/packages/tendermint-rpc/karma.conf.js +++ b/packages/tendermint-rpc/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: { diff --git a/packages/utils/karma.conf.js b/packages/utils/karma.conf.js index 9ee4e92603..75cd1626f6 100644 --- a/packages/utils/karma.conf.js +++ b/packages/utils/karma.conf.js @@ -15,7 +15,7 @@ module.exports = function (config) { frameworks: ["jasmine"], // list of files / patterns to load in the browser - files: ["dist/web/tests.js"], + files: ["../../jasmine-global-variables.js", "dist/web/tests.js"], client: { jasmine: {