Skip to content

[CI/CD]: Unit tests are broken and not executed in CI checks workflow #8176

Description

@suryaff733

Current Behavior

All 46 unit test files across the repository (src/**/*.test.js) and src/setupTests.js are broken and cannot execute:

  1. Missing & Incompatible Dependencies: src/setupTests.js and 45 test suites import enzyme and enzyme-adapter-react-16. Neither package is installed in package.json, and Enzyme is incompatible with the project's React 18 (MODULE_NOT_FOUND on execution).
  2. Empty Test File: src/sections/Community/Members-grid/index.test.js is a 0-byte empty file.
  3. Missing Runner & CI Blindspot: package.json lacks a "test" script, and .github/workflows/checks.yml never executes tests during PR checks, allowing broken test suites to persist unnoticed.

Desired Situation

  1. Modernize Test Framework: Migrate unit tests from deprecated enzyme to React Testing Library (@testing-library/react) with React 18 support and a modern test runner (e.g., Jest / Vitest).
  2. Update Test Setup: Update src/setupTests.js to configure @testing-library/jest-dom.
  3. Configure npm Test Script: Add a runnable "test" script (e.g., "test": "jest") to package.json.
  4. Enable CI Validation: Add npm test step to .github/workflows/checks.yml so unit tests are automatically verified on every Pull Request.

Activity

  1. added a commit that references this issue on Oct 5, 2026
    ad1cbaf
  2. Rajkaran-122 commented on Oct 5, 2026

    @Rajkaran-122
    Contributor

    Hi @suryaff733 sir , could you please review the current approach for #8176 #8181 and let me know if this direction is acceptable?

    I’ve migrated the testing setup from Enzyme toward React Testing Library, added the Jest/RTL configuration and mocks, updated the test script and CI, and preserved the meaningful source_url behavioral tests.

    One point I’d especially like your guidance on: several of the existing component tests currently require additional Gatsby/router/library mocks or component-specific props/data to run successfully. Would you prefer that I:

    1. continue fixing and migrating all of those tests in this PR, or
    2. keep this PR focused on establishing the React 18-compatible testing infrastructure and migrate the remaining failing tests in follow-up PRs?

    I’m happy to follow whichever approach is preferred. Thanks!

  3. added a commit that references this issue on Oct 5, 2026
    c98e776
  4. ayushgade06 commented on Oct 6, 2026

    @ayushgade06
    Contributor

    Hi @Rajkaran-122 , appreciate the enthusiasm and the work on #8181! 🙌

    Just a heads-up: per CONTRIBUTING.md → Working on an Issue, the convention is to first comment asking the maintainers to assign the issue to you, and only start work and open a PR once it's assigned.

    Without that, the PR risks going unreviewed, getting marked stale, and being closed without merge, since the guidelines note that work on unassigned issues "may go unaccepted".

    Could you request assignment here and wait for their go-ahead before continuing? Thanks!

  5. Rajkaran-122 commented on Oct 6, 2026

    @Rajkaran-122
    Contributor

    Hi @Rajkaran-122 , appreciate the enthusiasm and the work on #8181! 🙌

    Just a heads-up: per CONTRIBUTING.md → Working on an Issue, the convention is to first comment asking the maintainers to assign the issue to you, and only start work and open a PR once it's assigned.

    Without that, the PR risks going unreviewed, getting marked stale, and being closed without merge, since the guidelines note that work on unassigned issues "may go unaccepted".

    Could you request assignment here and wait for their go-ahead before continuing? Thanks!

    Ok

  6. Rajkaran-122 commented on Oct 6, 2026

    @Rajkaran-122
    Contributor

    @suryaff733 Could you please assign it to me?

  7. suryaff733 commented on Oct 6, 2026

    @suryaff733
    ContributorAuthor

    Sorry for the delayed response, @Rajkaran-122! And thanks for your interest and patience.

    Please join our Slack here: Meshery Slack

    Once you join, please introduce yourself in the channel and let us know here. I’ll coordinate with the maintainers and get the issue assigned to you. Thanks again!

  8. Rajkaran-122 commented on Oct 6, 2026

    @Rajkaran-122
    Contributor

    Sorry for the delayed response, @Rajkaran-122! And thanks for your interest and patience.

    Please join our Slack here: Meshery Slack

    Once you join, please introduce yourself in the channel and let us know here. I’ll coordinate with the maintainers and get the issue assigned to you. Thanks again!

    I joined the channel

  9. suryaff733 commented on Oct 6, 2026

    @suryaff733
    ContributorAuthor

    Hey @Rajkaran-122, glad you joined! 🙌

    Since I don’t have permission to assign the issue directly, please share the issue link and your PR link in <https://mesheryio.slack.com/archives/CFGG6U10|this Meshery channel> and request a maintainer to assign it to you.

    Once it’s assigned, you can continue with the work. I’ll review your PR as well. Thanks for your patience and interest in contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions