diff --git a/package.json b/package.json index 1b594ae43..d0ea2c717 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "forwarder": "node ./development/static-server.js ./node_modules/@metamask/forwarder/dist/ --port 9010", "dapp-forwarder": "concurrently -k -n forwarder,dapp -p '[{time}][{name}]' 'yarn forwarder' 'yarn dapp'", "sendwithprivatedapp": "node development/static-server.js test/e2e/send-eth-with-private-key-test --port 8080", - "test:unit": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/*.js\" \"ui/app/**/*.test.js\"", - "test:unit:global": "mocha --exit --require test/env.js --require test/setup.js --recursive test/unit-global/*", - "test:unit:lax": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/{,**/!(permissions)}/*.js\" \"ui/app/**/*.test.js\"", - "test:unit:strict": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/permissions/*.js\"", + "test:unit": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/*.test.js\" \"ui/app/**/*.test.js\"", + "test:unit:global": "mocha --exit --require test/env.js --require test/setup.js --recursive test/unit-global/*.test.js", + "test:unit:lax": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/{,**/!(permissions)}/*.test.js\" \"ui/app/**/*.test.js\"", + "test:unit:strict": "mocha --exit --require test/env.js --require test/setup.js --recursive \"test/unit/**/permissions/*.test.js\"", "test:unit:path": "mocha --exit --require test/env.js --require test/setup.js --recursive", "test:e2e:chrome": "SELENIUM_BROWSER=chrome test/e2e/run-all.sh", "test:e2e:chrome:metrics": "SELENIUM_BROWSER=chrome mocha test/e2e/metrics.spec.js", diff --git a/test/unit-global/frozenPromise.js b/test/unit-global/frozenPromise.test.js similarity index 100% rename from test/unit-global/frozenPromise.js rename to test/unit-global/frozenPromise.test.js diff --git a/test/unit/actions/config_test.js b/test/unit/actions/config.test.js similarity index 100% rename from test/unit/actions/config_test.js rename to test/unit/actions/config.test.js diff --git a/test/unit/actions/set_account_label_test.js b/test/unit/actions/set_account_label.test.js similarity index 100% rename from test/unit/actions/set_account_label_test.js rename to test/unit/actions/set_account_label.test.js diff --git a/test/unit/actions/set_selected_account_test.js b/test/unit/actions/set_selected_account.test.js similarity index 100% rename from test/unit/actions/set_selected_account_test.js rename to test/unit/actions/set_selected_account.test.js diff --git a/test/unit/actions/tx_test.js b/test/unit/actions/tx.test.js similarity index 100% rename from test/unit/actions/tx_test.js rename to test/unit/actions/tx.test.js diff --git a/test/unit/actions/warning_test.js b/test/unit/actions/warning.test.js similarity index 100% rename from test/unit/actions/warning_test.js rename to test/unit/actions/warning.test.js diff --git a/test/unit/app/ComposableObservableStore.js b/test/unit/app/ComposableObservableStore.test.js similarity index 100% rename from test/unit/app/ComposableObservableStore.js rename to test/unit/app/ComposableObservableStore.test.js diff --git a/test/unit/app/account-import-strategies.spec.js b/test/unit/app/account-import-strategies.test.js similarity index 100% rename from test/unit/app/account-import-strategies.spec.js rename to test/unit/app/account-import-strategies.test.js diff --git a/test/unit/app/buy-eth-url.spec.js b/test/unit/app/buy-eth-url.test.js similarity index 100% rename from test/unit/app/buy-eth-url.spec.js rename to test/unit/app/buy-eth-url.test.js diff --git a/test/unit/app/cleanErrorStack.spec.js b/test/unit/app/cleanErrorStack.test.js similarity index 100% rename from test/unit/app/cleanErrorStack.spec.js rename to test/unit/app/cleanErrorStack.test.js diff --git a/test/unit/app/controllers/cached-balances-test.js b/test/unit/app/controllers/cached-balances.test.js similarity index 100% rename from test/unit/app/controllers/cached-balances-test.js rename to test/unit/app/controllers/cached-balances.test.js diff --git a/test/unit/app/controllers/detect-tokens-test.js b/test/unit/app/controllers/detect-tokens.test.js similarity index 100% rename from test/unit/app/controllers/detect-tokens-test.js rename to test/unit/app/controllers/detect-tokens.test.js diff --git a/test/unit/app/controllers/ens-controller-test.js b/test/unit/app/controllers/ens-controller.test.js similarity index 100% rename from test/unit/app/controllers/ens-controller-test.js rename to test/unit/app/controllers/ens-controller.test.js diff --git a/test/unit/app/controllers/incoming-transactions-test.js b/test/unit/app/controllers/incoming-transactions.test.js similarity index 100% rename from test/unit/app/controllers/incoming-transactions-test.js rename to test/unit/app/controllers/incoming-transactions.test.js diff --git a/test/unit/app/controllers/metamask-controller-test.js b/test/unit/app/controllers/metamask-controller.test.js similarity index 100% rename from test/unit/app/controllers/metamask-controller-test.js rename to test/unit/app/controllers/metamask-controller.test.js diff --git a/test/unit/app/controllers/metametrics-test.js b/test/unit/app/controllers/metametrics.test.js similarity index 100% rename from test/unit/app/controllers/metametrics-test.js rename to test/unit/app/controllers/metametrics.test.js diff --git a/test/unit/app/controllers/network/network-controller-test.js b/test/unit/app/controllers/network/network-controller.test.js similarity index 100% rename from test/unit/app/controllers/network/network-controller-test.js rename to test/unit/app/controllers/network/network-controller.test.js diff --git a/test/unit/app/controllers/network/pending-middleware-test.js b/test/unit/app/controllers/network/pending-middleware.test.js similarity index 100% rename from test/unit/app/controllers/network/pending-middleware-test.js rename to test/unit/app/controllers/network/pending-middleware.test.js diff --git a/test/unit/app/controllers/permissions/permissions-controller-test.js b/test/unit/app/controllers/permissions/permissions-controller.test.js similarity index 100% rename from test/unit/app/controllers/permissions/permissions-controller-test.js rename to test/unit/app/controllers/permissions/permissions-controller.test.js diff --git a/test/unit/app/controllers/permissions/permissions-log-controller-test.js b/test/unit/app/controllers/permissions/permissions-log-controller.test.js similarity index 100% rename from test/unit/app/controllers/permissions/permissions-log-controller-test.js rename to test/unit/app/controllers/permissions/permissions-log-controller.test.js diff --git a/test/unit/app/controllers/permissions/permissions-middleware-test.js b/test/unit/app/controllers/permissions/permissions-middleware.test.js similarity index 100% rename from test/unit/app/controllers/permissions/permissions-middleware-test.js rename to test/unit/app/controllers/permissions/permissions-middleware.test.js diff --git a/test/unit/app/controllers/permissions/restricted-methods-test.js b/test/unit/app/controllers/permissions/restricted-methods.test.js similarity index 100% rename from test/unit/app/controllers/permissions/restricted-methods-test.js rename to test/unit/app/controllers/permissions/restricted-methods.test.js diff --git a/test/unit/app/controllers/preferences-controller-test.js b/test/unit/app/controllers/preferences-controller.test.js similarity index 100% rename from test/unit/app/controllers/preferences-controller-test.js rename to test/unit/app/controllers/preferences-controller.test.js diff --git a/test/unit/app/controllers/swaps-test.js b/test/unit/app/controllers/swaps.test.js similarity index 100% rename from test/unit/app/controllers/swaps-test.js rename to test/unit/app/controllers/swaps.test.js diff --git a/test/unit/app/controllers/token-rates-controller.js b/test/unit/app/controllers/token-rates-controller.test.js similarity index 100% rename from test/unit/app/controllers/token-rates-controller.js rename to test/unit/app/controllers/token-rates-controller.test.js diff --git a/test/unit/app/controllers/transactions/pending-tx-tracker-test.js b/test/unit/app/controllers/transactions/pending-tx-tracker.test.js similarity index 100% rename from test/unit/app/controllers/transactions/pending-tx-tracker-test.js rename to test/unit/app/controllers/transactions/pending-tx-tracker.test.js diff --git a/test/unit/app/controllers/transactions/tx-controller-test.js b/test/unit/app/controllers/transactions/tx-controller.test.js similarity index 99% rename from test/unit/app/controllers/transactions/tx-controller-test.js rename to test/unit/app/controllers/transactions/tx-controller.test.js index d8b362555..2dacf3c6a 100644 --- a/test/unit/app/controllers/transactions/tx-controller-test.js +++ b/test/unit/app/controllers/transactions/tx-controller.test.js @@ -437,6 +437,7 @@ describe('Transaction Controller', function () { gasPrice: originalValue, }, }; + // eslint-disable-next-line @babel/no-invalid-this this.timeout(15000); const wrongValue = '0x05'; diff --git a/test/unit/app/controllers/transactions/tx-gas-util-test.js b/test/unit/app/controllers/transactions/tx-gas-util.test.js similarity index 100% rename from test/unit/app/controllers/transactions/tx-gas-util-test.js rename to test/unit/app/controllers/transactions/tx-gas-util.test.js diff --git a/test/unit/app/controllers/transactions/tx-helper-test.js b/test/unit/app/controllers/transactions/tx-helper.test.js similarity index 100% rename from test/unit/app/controllers/transactions/tx-helper-test.js rename to test/unit/app/controllers/transactions/tx-helper.test.js diff --git a/test/unit/app/controllers/transactions/tx-state-history-helpers-test.js b/test/unit/app/controllers/transactions/tx-state-history-helpers.test.js similarity index 100% rename from test/unit/app/controllers/transactions/tx-state-history-helpers-test.js rename to test/unit/app/controllers/transactions/tx-state-history-helpers.test.js diff --git a/test/unit/app/controllers/transactions/tx-state-manager-test.js b/test/unit/app/controllers/transactions/tx-state-manager.test.js similarity index 100% rename from test/unit/app/controllers/transactions/tx-state-manager-test.js rename to test/unit/app/controllers/transactions/tx-state-manager.test.js diff --git a/test/unit/app/controllers/transactions/tx-utils-test.js b/test/unit/app/controllers/transactions/tx-utils.test.js similarity index 100% rename from test/unit/app/controllers/transactions/tx-utils-test.js rename to test/unit/app/controllers/transactions/tx-utils.test.js diff --git a/test/unit/app/message-manager-test.js b/test/unit/app/message-manager.test.js similarity index 100% rename from test/unit/app/message-manager-test.js rename to test/unit/app/message-manager.test.js diff --git a/test/unit/app/nodeify-test.js b/test/unit/app/nodeify.test.js similarity index 100% rename from test/unit/app/nodeify-test.js rename to test/unit/app/nodeify.test.js diff --git a/test/unit/app/personal-message-manager-test.js b/test/unit/app/personal-message-manager.test.js similarity index 100% rename from test/unit/app/personal-message-manager-test.js rename to test/unit/app/personal-message-manager.test.js diff --git a/test/unit/app/seed-phrase-verifier-test.js b/test/unit/app/seed-phrase-verifier.test.js similarity index 100% rename from test/unit/app/seed-phrase-verifier-test.js rename to test/unit/app/seed-phrase-verifier.test.js diff --git a/test/unit/app/typed-message-manager.spec.js b/test/unit/app/typed-message-manager.test.js similarity index 100% rename from test/unit/app/typed-message-manager.spec.js rename to test/unit/app/typed-message-manager.test.js diff --git a/test/unit/app/util-test.js b/test/unit/app/util.test.js similarity index 100% rename from test/unit/app/util-test.js rename to test/unit/app/util.test.js diff --git a/test/unit/balance-formatter-test.js b/test/unit/balance-formatter.test.js similarity index 100% rename from test/unit/balance-formatter-test.js rename to test/unit/balance-formatter.test.js diff --git a/test/unit/migrations/021-test.js b/test/unit/migrations/021.test.js similarity index 100% rename from test/unit/migrations/021-test.js rename to test/unit/migrations/021.test.js diff --git a/test/unit/migrations/022-test.js b/test/unit/migrations/022.test.js similarity index 100% rename from test/unit/migrations/022-test.js rename to test/unit/migrations/022.test.js diff --git a/test/unit/migrations/023-test.js b/test/unit/migrations/023.test.js similarity index 100% rename from test/unit/migrations/023-test.js rename to test/unit/migrations/023.test.js diff --git a/test/unit/migrations/024-test.js b/test/unit/migrations/024.test.js similarity index 100% rename from test/unit/migrations/024-test.js rename to test/unit/migrations/024.test.js diff --git a/test/unit/migrations/025-test.js b/test/unit/migrations/025.test.js similarity index 100% rename from test/unit/migrations/025-test.js rename to test/unit/migrations/025.test.js diff --git a/test/unit/migrations/026-test.js b/test/unit/migrations/026.test.js similarity index 100% rename from test/unit/migrations/026-test.js rename to test/unit/migrations/026.test.js diff --git a/test/unit/migrations/027-test.js b/test/unit/migrations/027.test.js similarity index 100% rename from test/unit/migrations/027-test.js rename to test/unit/migrations/027.test.js diff --git a/test/unit/migrations/028-test.js b/test/unit/migrations/028.test.js similarity index 100% rename from test/unit/migrations/028-test.js rename to test/unit/migrations/028.test.js diff --git a/test/unit/migrations/029-test.js b/test/unit/migrations/029.test.js similarity index 100% rename from test/unit/migrations/029-test.js rename to test/unit/migrations/029.test.js diff --git a/test/unit/migrations/030-test.js b/test/unit/migrations/030.test.js similarity index 100% rename from test/unit/migrations/030-test.js rename to test/unit/migrations/030.test.js diff --git a/test/unit/migrations/031-test.js b/test/unit/migrations/031.test.js similarity index 100% rename from test/unit/migrations/031-test.js rename to test/unit/migrations/031.test.js diff --git a/test/unit/migrations/033-test.js b/test/unit/migrations/033.test.js similarity index 100% rename from test/unit/migrations/033-test.js rename to test/unit/migrations/033.test.js diff --git a/test/unit/migrations/034-test.js b/test/unit/migrations/034.test.js similarity index 100% rename from test/unit/migrations/034-test.js rename to test/unit/migrations/034.test.js diff --git a/test/unit/migrations/035-test.js b/test/unit/migrations/035.test.js similarity index 100% rename from test/unit/migrations/035-test.js rename to test/unit/migrations/035.test.js diff --git a/test/unit/migrations/036-test.js b/test/unit/migrations/036.test.js similarity index 100% rename from test/unit/migrations/036-test.js rename to test/unit/migrations/036.test.js diff --git a/test/unit/migrations/037-test.js b/test/unit/migrations/037.test.js similarity index 100% rename from test/unit/migrations/037-test.js rename to test/unit/migrations/037.test.js diff --git a/test/unit/migrations/038-test.js b/test/unit/migrations/038.test.js similarity index 100% rename from test/unit/migrations/038-test.js rename to test/unit/migrations/038.test.js diff --git a/test/unit/migrations/039-test.js b/test/unit/migrations/039.test.js similarity index 100% rename from test/unit/migrations/039-test.js rename to test/unit/migrations/039.test.js diff --git a/test/unit/migrations/040-test.js b/test/unit/migrations/040.test.js similarity index 100% rename from test/unit/migrations/040-test.js rename to test/unit/migrations/040.test.js diff --git a/test/unit/migrations/041-test.js b/test/unit/migrations/041.test.js similarity index 100% rename from test/unit/migrations/041-test.js rename to test/unit/migrations/041.test.js diff --git a/test/unit/migrations/042-test.js b/test/unit/migrations/042.test.js similarity index 100% rename from test/unit/migrations/042-test.js rename to test/unit/migrations/042.test.js diff --git a/test/unit/migrations/043-test.js b/test/unit/migrations/043.test.js similarity index 100% rename from test/unit/migrations/043-test.js rename to test/unit/migrations/043.test.js diff --git a/test/unit/migrations/044-test.js b/test/unit/migrations/044.test.js similarity index 100% rename from test/unit/migrations/044-test.js rename to test/unit/migrations/044.test.js diff --git a/test/unit/migrations/045-test.js b/test/unit/migrations/045.test.js similarity index 100% rename from test/unit/migrations/045-test.js rename to test/unit/migrations/045.test.js diff --git a/test/unit/migrations/046-test.js b/test/unit/migrations/046.test.js similarity index 100% rename from test/unit/migrations/046-test.js rename to test/unit/migrations/046.test.js diff --git a/test/unit/migrations/047-test.js b/test/unit/migrations/047.test.js similarity index 100% rename from test/unit/migrations/047-test.js rename to test/unit/migrations/047.test.js diff --git a/test/unit/migrations/048-test.js b/test/unit/migrations/048.test.js similarity index 100% rename from test/unit/migrations/048-test.js rename to test/unit/migrations/048.test.js diff --git a/test/unit/migrations/049-test.js b/test/unit/migrations/049.test.js similarity index 100% rename from test/unit/migrations/049-test.js rename to test/unit/migrations/049.test.js diff --git a/test/unit/migrations/050-test.js b/test/unit/migrations/050.test.js similarity index 100% rename from test/unit/migrations/050-test.js rename to test/unit/migrations/050.test.js diff --git a/test/unit/migrations/051-test.js b/test/unit/migrations/051.test.js similarity index 100% rename from test/unit/migrations/051-test.js rename to test/unit/migrations/051.test.js diff --git a/test/unit/migrations/052-test.js b/test/unit/migrations/052.test.js similarity index 100% rename from test/unit/migrations/052-test.js rename to test/unit/migrations/052.test.js diff --git a/test/unit/migrations/migrations-test.js b/test/unit/migrations/migrations.test.js similarity index 100% rename from test/unit/migrations/migrations-test.js rename to test/unit/migrations/migrations.test.js diff --git a/test/unit/migrations/migrator-test.js b/test/unit/migrations/migrator.test.js similarity index 98% rename from test/unit/migrations/migrator-test.js rename to test/unit/migrations/migrator.test.js index ee20cc7a6..bb0771cd9 100644 --- a/test/unit/migrations/migrator-test.js +++ b/test/unit/migrations/migrator.test.js @@ -70,7 +70,7 @@ describe('migrations', function () { const fileNames = fs.readdirSync('./test/unit/migrations/'); const testNumbers = fileNames .reduce((acc, filename) => { - const name = filename.split('-test.')[0]; + const name = filename.split('.test.')[0]; if (/^\d+$/u.test(name)) { acc.push(name); } diff --git a/test/unit/migrations/template-test.js b/test/unit/migrations/template.test.js similarity index 100% rename from test/unit/migrations/template-test.js rename to test/unit/migrations/template.test.js diff --git a/test/unit/responsive/components/dropdown-test.js b/test/unit/responsive/components/dropdown.test.js similarity index 100% rename from test/unit/responsive/components/dropdown-test.js rename to test/unit/responsive/components/dropdown.test.js diff --git a/test/unit/ui/app/actions.spec.js b/test/unit/ui/app/actions.test.js similarity index 100% rename from test/unit/ui/app/actions.spec.js rename to test/unit/ui/app/actions.test.js diff --git a/test/unit/ui/app/reducers/app.spec.js b/test/unit/ui/app/reducers/app.test.js similarity index 100% rename from test/unit/ui/app/reducers/app.spec.js rename to test/unit/ui/app/reducers/app.test.js diff --git a/test/unit/ui/app/reducers/metamask.spec.js b/test/unit/ui/app/reducers/metamask.test.js similarity index 100% rename from test/unit/ui/app/reducers/metamask.spec.js rename to test/unit/ui/app/reducers/metamask.test.js