Revert "Merge pull request #19 from rtCamp/feat/add-test-for-plugin"#21
Revert "Merge pull request #19 from rtCamp/feat/add-test-for-plugin"#21theMasudRana merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
| "phpstan/extension-installer": "^1.3", | ||
| "phpstan/phpstan": "^2.1.22", | ||
| "phpstan/phpstan-deprecation-rules": "^2.0.3", | ||
| "phpstan/phpstan-phpunit": "^2.0.3", |
There was a problem hiding this comment.
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.
| "phpstan/phpstan-phpunit": "^2.0.3", |
| /** | ||
| * 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 |
There was a problem hiding this comment.
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.
This PR reverts PR #19, which was merged into
mainby mistake.The tests and related infrastructure are intended to be merged into
develop.No functional changes intended for
main.