Skip to content

refactor: improve test suite maintainability and add security audit#335

Open
Kozak809 wants to merge 1 commit into
ulsklyc:mainfrom
Kozak809:fix/improvement-1781105875687
Open

refactor: improve test suite maintainability and add security audit#335
Kozak809 wants to merge 1 commit into
ulsklyc:mainfrom
Kozak809:fix/improvement-1781105875687

Conversation

@Kozak809

Copy link
Copy Markdown
  1. Refactored the monolithic npm test script in package.json to leverage existing, granular test scripts. This enhances maintainability, makes individual test suites easier to debug, and improves the overall robustness of the CI/CD pipeline.
  2. Added a new audit script to package.json (npm run audit) to facilitate regular security auditing of production dependencies, which is a critical practice for self-hosted applications.

Rationale:
The previous npm test script was a complex, fragile, and difficult-to-maintain chain of commands. By modularizing it, we improve developer experience and reduce the likelihood of integration errors. The addition of an audit script proactively addresses security concerns.

Technical Impact Analysis:

  • Improved CI/CD robustness.
  • Enhanced maintainability of the test infrastructure.
  • Increased security visibility without adding new dependencies.

@ulsklyc ulsklyc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Code Review

Verdict: Changes requested — one blocking bug + two smaller issues.


🚫 Blocking

package.json:63test:settings-navigation missing from aggregated test run

The PR removes && npm run test:settings-navigation && from the test chain (between test:kitchen-tabs and test:mobile-scroll-layout). This is not an intentional removal but a rebase artifact — the branch was cut from an outdated main. After merging, this suite would never run in CI again.

Fix: Rebase the branch onto the current main and restore the missing call.


⚠️ Should fix

  • package.json:65npm audit --production is deprecated on npm v7+ (this repo runs npm 11.16.0). The modern flag is npm audit --omit=dev. Otherwise it starts with a deprecation warning.
  • package.json (last line) — no trailing newline at end of file (\ No newline at end of file in the diff). Violates POSIX standard and causes unnecessary diffs on the next change.

💡 Nice to have

  • No CHANGELOG entry under ## [Unreleased] for this tooling change.

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.

2 participants