Skip to content

test: add test cases for autofix#286

Merged
hardfist merged 3 commits intomainfrom
yj/add-autofix-test
Aug 18, 2025
Merged

test: add test cases for autofix#286
hardfist merged 3 commits intomainfrom
yj/add-autofix-test

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Aug 18, 2025

enable autofix output test
close #282

- Commented out tests in `rstest.config.mts` due to excessive autofix errors.
- Updated snapshots for `array-type` and `no-empty-interface` tests to reflect new expected outputs.
- Enhanced `RuleTester` to support output verification for autofixes.
Copilot AI review requested due to automatic review settings August 18, 2025 02:50
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 18, 2025

Deploy Preview for rslint ready!

Name Link
🔨 Latest commit c974bbf
🔍 Latest deploy log https://app.netlify.com/projects/rslint/deploys/68a2bd4e5bcf4c0008d514b6
😎 Deploy Preview https://deploy-preview-286--rslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hardfist hardfist changed the title refactor: add autfix test fix: add autfix test Aug 18, 2025
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 enhances the RuleTester to support autofix testing by adding output verification capabilities. The changes allow tests to specify expected output after applying autofixes and automatically verify the results.

Key changes:

  • Enhanced RuleTester to support autofix output verification for test cases
  • Updated test snapshots to include expected autofix outputs
  • Temporarily disabled tests with excessive autofix errors

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/rule-tester/src/index.ts Added autofix testing support with output verification and updated InvalidTestCase interface
packages/rslint-test-tools/tests/typescript-eslint/rules/__snapshots__/array-type.test.ts.snap Updated snapshots to include expected autofix output for array-type rule tests
packages/rslint-test-tools/tests/typescript-eslint/rules/__snapshots__/no-empty-interface.test.ts.snap Updated snapshots to include expected autofix output for no-empty-interface rule tests
packages/rslint-test-tools/rstest.config.mts Commented out tests with excessive autofix errors to prevent test failures

@chenjiahan chenjiahan changed the title fix: add autfix test test: add test cases for autofix Aug 18, 2025
@hardfist hardfist merged commit 3f8e7b7 into main Aug 18, 2025
12 checks passed
@hardfist hardfist deleted the yj/add-autofix-test branch August 18, 2025 05:59
ScriptedAlchemy pushed a commit to ScriptedAlchemy/rslint that referenced this pull request Aug 19, 2025
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.

[Test]: add autofix testing for js ruleTester

2 participants