test: fix configuration test failures and quote npm script glob#435
test: fix configuration test failures and quote npm script glob#435MatrixNeoKozak wants to merge 1 commit into
Conversation
WalkthroughThis PR updates test expectations in bootstrap.config.test.js to reflect renamed styleLoaders identifiers and path.resolve-based path construction, adding new undefined fields to expected results. Separately, package.json's test script quotes the test file glob argument. ChangesTest expectations and script update
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR fixes configuration test expectations and makes the test script glob portable.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "test: fix configuration test failures an..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@node_package/tests/bootstrap.config.test.js`:
- Around line 112-115: The multi-line path.resolve argument lists in
bootstrap.config.test.js are missing trailing commas, causing ESLint/Prettier
failures. Update the path.resolve calls that set bootstrapCustomizations and the
other affected config path so each continued argument line ends with a trailing
comma, keeping the formatting consistent with the existing test config style.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0aeff2fd-baa3-4123-9faf-ef42a0135e2c
📒 Files selected for processing (2)
node_package/tests/bootstrap.config.test.jspackage.json
| bootstrapCustomizations: path.resolve( | ||
| testConfigsDir, | ||
| './path/to/bootstrap/customizations.scss' | ||
| ), |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add missing trailing commas flagged by ESLint/Prettier.
Static analysis flags missing trailing commas in the multi-line path.resolve argument lists (lines 114 and 122), which will fail lint/CI.
💚 Proposed fix
bootstrapCustomizations: path.resolve(
testConfigsDir,
- './path/to/bootstrap/customizations.scss'
+ './path/to/bootstrap/customizations.scss',
),
bootstrapVersion: 4,
configFilePath: path.resolve(testConfigsDir, './test_bootstraprc'),
extractStyles: true,
loglevel: undefined,
preBootstrapCustomizations: path.resolve(
testConfigsDir,
- './path/to/bootstrap/pre-customizations.scss'
+ './path/to/bootstrap/pre-customizations.scss',
),Also applies to: 120-123
🧰 Tools
🪛 ESLint
[error] 114-114: Insert ,
(prettier/prettier)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@node_package/tests/bootstrap.config.test.js` around lines 112 - 115, The
multi-line path.resolve argument lists in bootstrap.config.test.js are missing
trailing commas, causing ESLint/Prettier failures. Update the path.resolve calls
that set bootstrapCustomizations and the other affected config path so each
continued argument line ends with a trailing comma, keeping the formatting
consistent with the existing test config style.
Source: Linters/SAST tools
Fixes two configuration-related tests that were failing due to out-of-date expectation objects and hardcoded remote paths (specifically a
/home/ubuntu/...prefix). Also quotes the test glob pattern in package.json to prevent incorrect shell expansion so that all tests are correctly run.Summary by CodeRabbit