From a7fade87244bdd1c42c46dbbff1b776298d7821d Mon Sep 17 00:00:00 2001 From: Jaco Date: Wed, 1 Sep 2021 21:38:45 +0300 Subject: [PATCH] Jest config cleanup (#6053) * Jest config cleanup * auto-lint fixes --- jest.config.cjs | 1 - package.json | 4 +- packages/apps-electron/package.json | 2 +- packages/apps/package.json | 2 +- packages/page-accounts/package.json | 4 +- .../page-accounts/src/Accounts/Account.tsx | 4 +- .../page-accounts/test/pages/accountsPage.tsx | 4 +- packages/page-bounties/src/Bounties.tsx | 2 +- packages/page-bounties/src/Bounty.tsx | 2 +- .../src/BountyInfos/VotingDescriptionInfo.tsx | 2 +- .../src/BountyInfos/VotingSummary.tsx | 2 +- .../src/BountyNextActionInfo/BountyInfo.tsx | 2 +- packages/page-bounties/src/VotersColumn.tsx | 2 +- packages/page-bounties/src/index.tsx | 2 +- .../page-bounties/test/pages/bountiesPage.tsx | 4 +- packages/page-council/src/Overview/Voters.tsx | 2 +- packages/page-signing/src/Sign.tsx | 2 +- packages/react-api/package.json | 2 +- packages/react-components/package.json | 8 +- packages/react-components/src/AddressInfo.tsx | 10 +- .../react-components/src/AddressSmall.tsx | 2 +- packages/react-components/src/InputFile.tsx | 4 +- .../react-components/src/Menu/Divider.tsx | 2 +- packages/react-components/src/Modal/Base.tsx | 2 +- .../react-components/src/Modal/Modal.spec.tsx | 2 +- .../react-components/src/Popup/Popup.spec.tsx | 2 +- yarn.lock | 861 +++++++++--------- 27 files changed, 470 insertions(+), 468 deletions(-) diff --git a/jest.config.cjs b/jest.config.cjs index 923c36703e..8c872ee7c6 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -22,7 +22,6 @@ module.exports = { '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object', '\\.(md)$': '/jest/mocks/empty.js' }, - modulePathIgnorePatterns: ['/packages/apps-config/build'], setupFilesAfterEnv: ['/jest/jest-setup.ts'], testEnvironment: 'jsdom', testTimeout: 90000, diff --git a/package.json b/package.json index 63df50b314..8473c1ff36 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@polkadot/hw-ledger": "^7.3.1", "@polkadot/keyring": "^7.3.1", "@polkadot/networks": "^7.3.1", - "@polkadot/phishing": "^0.6.275", + "@polkadot/phishing": "^0.6.277", "@polkadot/types": "^5.7.1", "@polkadot/types-known": "^5.7.1", "@polkadot/types-support": "^5.7.1", @@ -73,7 +73,7 @@ "@babel/runtime": "^7.15.3", "@crustio/crust-pin": "^1.0.0", "@pinata/sdk": "^1.1.23", - "@polkadot/dev": "^0.62.62", + "@polkadot/dev": "^0.62.65", "@polkadot/ts": "^0.4.6", "@types/bn.js": "^4.11.6", "@types/chart.js": "^2.9.34", diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 455900a63f..84537a8667 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -6,7 +6,7 @@ "dependencies": { "@babel/core": "^7.15.0", "@babel/polyfill": "^7.12.1", - "@polkadot/dev": "^0.62.62", + "@polkadot/dev": "^0.62.65", "@polkadot/react-components": "^0.95.2-76", "electron-log": "^4.3.5", "electron-updater": "^4.3.10" diff --git a/packages/apps/package.json b/packages/apps/package.json index e7239c1ba5..dcdd65c744 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -11,7 +11,7 @@ "@babel/runtime": "^7.15.3", "@polkadot/apps-config": "^0.95.2-76", "@polkadot/apps-routing": "^0.95.2-76", - "@polkadot/dev": "^0.62.62", + "@polkadot/dev": "^0.62.65", "@polkadot/react-api": "^0.95.2-76", "@polkadot/react-components": "^0.95.2-76", "@polkadot/react-hooks": "^0.95.2-76", diff --git a/packages/page-accounts/package.json b/packages/page-accounts/package.json index 5329a62730..975a3b593b 100644 --- a/packages/page-accounts/package.json +++ b/packages/page-accounts/package.json @@ -6,9 +6,9 @@ "license": "Apache-2.0", "dependencies": { "@babel/runtime": "^7.15.3", - "@polkadot/phishing": "^0.6.275", + "@polkadot/phishing": "^0.6.277", "@polkadot/react-components": "^0.95.2-76", - "@polkadot/vanitygen": "^0.45.3", + "@polkadot/vanitygen": "^0.45.4-1", "detect-browser": "^5.2.0", "file-saver": "^2.0.5" }, diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index 60a3205046..1f87301f0c 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -687,8 +687,8 @@ function Account ({ account: { address, meta }, className = '', delegation, filt /> - - + + -
+
- + diff --git a/packages/page-bounties/src/Bounties.tsx b/packages/page-bounties/src/Bounties.tsx index 926d1406c3..1f5368bbea 100644 --- a/packages/page-bounties/src/Bounties.tsx +++ b/packages/page-bounties/src/Bounties.tsx @@ -29,7 +29,7 @@ function Bounties ({ className }: Props): React.ReactElement { return (
- + diff --git a/packages/page-bounties/src/Bounty.tsx b/packages/page-bounties/src/Bounty.tsx index ae883da23c..357c1248ed 100644 --- a/packages/page-bounties/src/Bounty.tsx +++ b/packages/page-bounties/src/Bounty.tsx @@ -75,7 +75,7 @@ function Bounty ({ bestNumber, bounty, className = '', description, index, isEve
- + diff --git a/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx b/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx index 971078a0e8..64037ff08c 100644 --- a/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx @@ -35,7 +35,7 @@ function VotingDescriptionInfo ({ className, proposal, status }: Props): React.R data-testid='voting-description' > {bestProposalName && votingDescriptions.current[bestProposalName] && - + }
); diff --git a/packages/page-bounties/src/BountyInfos/VotingSummary.tsx b/packages/page-bounties/src/BountyInfos/VotingSummary.tsx index 22977e2d62..e93f8897c5 100644 --- a/packages/page-bounties/src/BountyInfos/VotingSummary.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingSummary.tsx @@ -37,7 +37,7 @@ function VotingSummary ({ className, proposal, status }: Props): JSX.Element {
{t('Aye')} {ayes}/{threshold}
{t('Nay')} {nays}/{nayThreshold}
- + {type === 'warning' && (
- +
)}
diff --git a/packages/page-bounties/src/VotersColumn.tsx b/packages/page-bounties/src/VotersColumn.tsx index 71b8b61215..6256d95ac2 100644 --- a/packages/page-bounties/src/VotersColumn.tsx +++ b/packages/page-bounties/src/VotersColumn.tsx @@ -35,7 +35,7 @@ function VotersColumn ({ className, option, proposals, status }: Props): React.R data-testid={`voters_${option}_${accountId.toString()}`} key={accountId.toString()} > - +
), [option, votes]); diff --git a/packages/page-bounties/src/index.tsx b/packages/page-bounties/src/index.tsx index f9d5d15e55..d30eb327af 100644 --- a/packages/page-bounties/src/index.tsx +++ b/packages/page-bounties/src/index.tsx @@ -32,7 +32,7 @@ function BountiesApp ({ basePath, className = '' }: Props): React.ReactElement

- + ); } diff --git a/packages/page-bounties/test/pages/bountiesPage.tsx b/packages/page-bounties/test/pages/bountiesPage.tsx index 13d73042c2..df96f00559 100644 --- a/packages/page-bounties/test/pages/bountiesPage.tsx +++ b/packages/page-bounties/test/pages/bountiesPage.tsx @@ -115,13 +115,13 @@ export class BountiesPage { return render( <> -

+
- + diff --git a/packages/page-council/src/Overview/Voters.tsx b/packages/page-council/src/Overview/Voters.tsx index 650ff8288c..a01182fa6d 100644 --- a/packages/page-council/src/Overview/Voters.tsx +++ b/packages/page-council/src/Overview/Voters.tsx @@ -22,7 +22,7 @@ function Voters ({ balance, voters }: Props): React.ReactElement { return ( <> - } > + }> {voters.map((who): React.ReactNode => { {isLocked && (
- {t('You need to unlock this account to be able to sign data.')}
+ {t('You need to unlock this account to be able to sign data.')}