Skip to content

Revert "Merge pull request #19 from rtCamp/feat/add-test-for-plugin"#21

Merged
theMasudRana merged 1 commit intomainfrom
revert-tests-from-main
Feb 5, 2026
Merged

Revert "Merge pull request #19 from rtCamp/feat/add-test-for-plugin"#21
theMasudRana merged 1 commit intomainfrom
revert-tests-from-main

Conversation

@theMasudRana
Copy link
Copy Markdown
Collaborator

This PR reverts PR #19, which was merged into main by mistake.
The tests and related infrastructure are intended to be merged into develop.

No functional changes intended for main.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR reverts PR #19 which mistakenly merged comprehensive test infrastructure into the main branch. The test infrastructure was intended for the develop branch. The revert removes all JavaScript and PHP test files, test configuration, and related dependencies.

Changes:

  • Removes all PHP unit tests (14 tests covering Plugin class, Singleton trait)
  • Removes all JavaScript unit tests (86 tests covering carousel view logic and type definitions)
  • Removes test infrastructure and configuration files (jest.config.js, phpunit.xml.dist, test setup files)
  • Removes test-related dependencies from package.json and composer.json
  • Updates core-carousel.php plugin header

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/phpstan/constants.php Deleted PHPStan bootstrap constants file
tests/php/bootstrap.php Deleted PHPUnit bootstrap file
tests/php/Unit/UnitTestCase.php Deleted base test case class
tests/php/Unit/Traits/SingletonTest.php Deleted Singleton trait tests
tests/php/Unit/PluginTest.php Deleted Plugin class tests
tests/js/tsconfig.json Deleted TypeScript config for tests
tests/js/setup.ts Deleted Jest setup file with WordPress mocks
tests/js/mocks/wordpress-interactivity.ts Deleted WordPress Interactivity API mock
src/blocks/carousel/tests/view.test.ts Deleted carousel view tests
src/blocks/carousel/tests/types.test.ts Deleted carousel type tests
phpunit.xml.dist Deleted PHPUnit configuration
jest.config.js Deleted Jest configuration
package.json Removed Jest and testing-library dependencies, removed test scripts
package-lock.json Updated lockfile to reflect removed dependencies
composer.json Removed Brain\Monkey, PHPUnit, and Yoast polyfills dependencies, removed test scripts
composer.lock Updated lockfile to reflect removed dependencies
core-carousel.php Modified plugin header (URI change and metadata removal)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* Plugin URI: https://github.com/rtCamp/core-carousel
* Requires at least: 6.1
* Requires PHP: 7.4
* Plugin URI: https://rtcamp.com
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The Plugin URI was changed from "https://github.com/rtCamp/core-carousel" to "https://rtcamp.com". While this might be intentional, it's not mentioned in the PR description which states "No functional changes intended for main." This appears to be unrelated to reverting the test infrastructure and should either be reverted or documented.

Copilot uses AI. Check for mistakes.
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^2.1.22",
"phpstan/phpstan-deprecation-rules": "^2.0.3",
"phpstan/phpstan-phpunit": "^2.0.3",
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The phpstan/phpstan-phpunit dependency is still present in composer.json but is no longer needed since PHPUnit and its tests are being removed. This package provides PHPUnit-specific extensions for PHPStan and should be removed along with the other test-related dependencies.

Suggested change
"phpstan/phpstan-phpunit": "^2.0.3",

Copilot uses AI. Check for mistakes.
Comment on lines 2 to +5
/**
* Plugin Name: Core Carousel
* Description: Carousel block using Embla and WordPress Interactivity API.
* Plugin URI: https://github.com/rtCamp/core-carousel
* Requires at least: 6.1
* Requires PHP: 7.4
* Plugin URI: https://rtcamp.com
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The plugin header removed "Requires at least: 6.1" and "Requires PHP: 7.4" metadata. These fields are standard WordPress plugin headers that specify minimum WordPress and PHP version requirements. This change is not mentioned in the PR description which states "No functional changes intended for main." These should be kept or the removal should be documented.

Copilot uses AI. Check for mistakes.
@theMasudRana theMasudRana merged commit 24e1311 into main Feb 5, 2026
10 checks passed
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.

3 participants