feat: enforce fixture-backed e2e setup - #38
Open
harshal015 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new core ESLint rule (enforce-fixture-setup) intended to enforce fixture-backed E2E spec setup by requiring a sibling fixture.yml and flagging certain “fixture-supported” runtime setup calls when their results are unused.
Changes:
- Introduces
enforce-fixture-setuprule implementation and exports it from the core plugin entrypoint. - Adds comprehensive RuleTester coverage plus on-disk fixture directories/files to validate filesystem-based behavior.
- Documents the new rule and links it from the docs index.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/rules/enforce-fixture-setup.js | Implements the filesystem-backed rule and runtime-setup detection logic. |
| packages/core/src/index.js | Exports the new rule from the plugin. |
| packages/core/src/tests/enforce-fixture-setup.test.js | Adds RuleTester coverage for missing fixtures and fixture-backed runtime setup calls. |
| packages/core/src/tests/fixtures/fixture-setup/with-fixture/fixture.yml | Adds a fixture file used by the new tests. |
| packages/core/src/tests/fixtures/fixture-setup/without-fixture/README.md | Adds a placeholder file to keep a “no fixture” directory in git for tests. |
| packages/docs/rules/enforce-fixture-setup.md | Adds end-user documentation for the new rule and supported methods. |
| packages/docs/README.md | Adds the new rule to the documentation listing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+235
to
+237
| if (value.type === 'Identifier') { | ||
| return value.name === 'undefined'; | ||
| } |
| @@ -0,0 +1 @@ | |||
| This directory intentionally has no `fixture.yml` for the missing-fixture rule test. | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
app.clickup.com
Brief description of the changes made in this PR.
Type of Change
Testing
Checklist
npm run lint)npm test)npm run type-check)Related Issues
Closes #(issue number)
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Any additional information that reviewers should know.