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

feat(tests): splitting integration tests #503

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

geekbrother
Copy link
Contributor

@geekbrother geekbrother commented Feb 6, 2024

Description

This PR splits Jest integration tests from one huge file into endpoint per file approach.
As the integration tests are growing and a large amount of lines for tests (especially for the new ENS endpoints) are added, the single integration test file becomes unmaintainable. It's better to split it.

The following changes are made:

  • integration.test.ts is removed,
  • init.ts is created for a common test setup,
  • generators.test.ts, health.test.ts, history.test.ts, identity.test.ts, middlewares.test.ts, names.test.ts, portfolio.test.ts, proxy.test.ts test files are created.

How Has This Been Tested?

Run these tests for a prod endpoint:

PROJECT_ID=xxx RPC_URL=https://rpc.walletconnect.com  yarn integration

The expected result:

  • All tests are passed.

Due Diligence

  • Breaking change
  • Requires a documentation update
  • Requires a e2e/integration test update

@geekbrother geekbrother self-assigned this Feb 6, 2024
@geekbrother geekbrother changed the title feat(testsing): splitting integration tests feat(tests): splitting integration tests Feb 6, 2024
@geekbrother geekbrother force-pushed the feat/split_integration_tests branch from b718977 to ae27807 Compare February 6, 2024 17:32
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"esModuleInterop": true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fix for the following warning:

ts-jest[config] (WARN) message TS151001: If you have issues related to imports, you should consider setting `esModuleInterop` to `true` in your TypeScript configuration file (usually `tsconfig.json`). See https://blogs.msdn.microsoft.com/typescript/2018/01/31/announcing-typescript-2-7/#easier-ecmascript-module-interoperability for more information.

@geekbrother geekbrother marked this pull request as ready for review February 6, 2024 17:35
@geekbrother geekbrother requested a review from xav as a code owner February 6, 2024 17:35
@geekbrother geekbrother merged commit 3b0c4dd into master Feb 6, 2024
7 checks passed
@geekbrother geekbrother deleted the feat/split_integration_tests branch February 6, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants