Skip to content

Supersede #906: entry shape test with lint-compliant matcher#910

Closed
justin808 wants to merge 2 commits intomainfrom
codex/supersede-906-entry-shape
Closed

Supersede #906: entry shape test with lint-compliant matcher#910
justin808 wants to merge 2 commits intomainfrom
codex/supersede-906-entry-shape

Conversation

@justin808
Copy link
Copy Markdown
Member

Supersedes #906. Closes #792.

Summary

Validation

  • yarn test test/package/environments/base.test.js
  • yarn eslint test/package/environments/base.test.js --max-warnings 0

Notes

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 15, 2026

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 4 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/supersede-906-entry-shape

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 15, 2026

Greptile Summary

This PR adds a regression test that explicitly asserts the shape of webpack entry values produced by getEntryObject() in package/environments/base.ts. Single-file entries must be strings and multi-file entries must be arrays of strings — a contract that downstream TypeScript consumers rely on for type narrowing. The test uses toStrictEqual with expect.arrayContaining / expect.any(String) to satisfy the project's jest/prefer-strict-equal ESLint rule.

Confidence Score: 5/5

  • This PR is safe to merge — it only adds a new test case with no production code changes.
  • The change is a single, well-scoped test addition (11 lines) that uses established Jest patterns and complies with the project's lint rules. No production code is modified. The assertions correctly validate the entry shapes documented in the source (package/environments/base.ts lines 50-86).
  • No files require special attention.

Important Files Changed

Filename Overview
test/package/environments/base.test.js Adds a new test case that explicitly asserts entry value shapes (string for single-file entries, array of strings for multi-file entries). Uses toStrictEqual to comply with jest/prefer-strict-equal lint rule. No issues found.

Flowchart

flowchart TD
    A[getEntryObject in base.ts] -->|single file| B["entries[name] = assetPath\n(string)"]
    A -->|multiple files same name| C["entries[name] = [path1, path2]\n(string[])"]
    B --> D[New shape test]
    C --> D
    D -->|asserts| E["typeof application === 'string'"]
    D -->|asserts| F["Array.isArray(multi_entry) === true"]
    D -->|asserts| G["multi_entry contains String elements"]
Loading

Last reviewed commit: 25442b7

@justin808
Copy link
Copy Markdown
Member Author

Superseded by #919, which preserves the #910 test fix and adds the current lint-unblock commit.

@justin808 justin808 closed this Feb 15, 2026
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.

Validate type narrowing for Entry type in base.ts

1 participant