Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Update import export tests #4551

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Tests: Update import export tests #4551

merged 1 commit into from
Nov 22, 2024

Conversation

mike10ca
Copy link
Contributor

@mike10ca mike10ca commented Nov 22, 2024

What it solves

How this PR fixes it

  • Refactoring: removed extra signer connection to avoid issues with safe loading

How to test it

  • Run Cypress tests and observe outcome

Copy link

github-actions bot commented Nov 22, 2024

@francovenica francovenica self-requested a review November 22, 2024 11:44
Copy link

github-actions bot commented Nov 22, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link

github-actions bot commented Nov 22, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🟡 Statements
74.28% (-0.01% 🔻)
13977/18816
🔴 Branches
52.6% (-0.02% 🔻)
3471/6599
🔴 Functions 58.08% 2046/3523
🟡 Lines
75.91% (-0.01% 🔻)
12694/16722
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / useTxPendingStatuses.ts
83.64% (-0.91% 🔻)
68.33% (-1.67% 🔻)
75%
92.63% (-1.05% 🔻)

Test suite run failed

Failed tests: 0/1610. Failed suites: 1/217.
  ● Test suite failed to run

    Jest encountered an unexpected token

    Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

    Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.

    By default "node_modules" folder is ignored by transformers.

    Here's what you can do:
     • If you are trying to use ECMAScript Modules, see https://jestjs.io/docs/ecmascript-modules for how to enable it.
     • If you are trying to use TypeScript, see https://jestjs.io/docs/getting-started#using-typescript
     • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
     • If you need a custom transformation specify a "transform" option in your config.
     • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.

    You'll find more details and examples of these config options in the docs:
    https://jestjs.io/docs/configuration
    For information about custom transformations, see:
    https://jestjs.io/docs/code-transformation

    Details:

    /home/runner/work/safe-wallet-web/safe-wallet-web/node_modules/@reown/walletkit/node_modules/uint8arrays/esm/src/index.js:1
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,jest){import { compare } from './compare.js';
                                                                                      ^^^^^^

    SyntaxError: Cannot use import statement outside a module

    

      at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1505:14)
      at Object.<anonymous> (node_modules/@reown/walletkit/node_modules/@walletconnect/utils/dist/index.cjs.js:1:596)
      at Object.<anonymous> (node_modules/@reown/walletkit/node_modules/@walletconnect/core/dist/index.cjs.js:1:461)
      at Object.<anonymous> (node_modules/@reown/walletkit/dist/index.cjs.js:1:217)
      at Object.<anonymous> (src/features/walletconnect/services/WalletConnectWallet.ts:2155:26)
      at Object.<anonymous> (src/features/walletconnect/__tests__/WalletConnectContext.test.tsx:13:69)

Report generated by 🧪jest coverage report action from d6107dc

@mike10ca mike10ca force-pushed the update-import-tests branch from 64b0d63 to d6107dc Compare November 22, 2024 12:00
@katspaugh katspaugh merged commit a4862ad into dev Nov 22, 2024
13 of 15 checks passed
@katspaugh katspaugh deleted the update-import-tests branch November 22, 2024 12:10
@github-actions github-actions bot locked and limited conversation to collaborators Nov 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants