Skip to content

test: fix configuration test failures and quote npm script glob#435

Open
MatrixNeoKozak wants to merge 1 commit into
shakacode:masterfrom
MatrixNeoKozak:fix/improvement-1783242566489
Open

test: fix configuration test failures and quote npm script glob#435
MatrixNeoKozak wants to merge 1 commit into
shakacode:masterfrom
MatrixNeoKozak:fix/improvement-1783242566489

Conversation

@MatrixNeoKozak

@MatrixNeoKozak MatrixNeoKozak commented Jul 5, 2026

Copy link
Copy Markdown

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

  • Tests
    • Updated automated test expectations to match current configuration output.
    • Improved path handling in tests for more consistent results across environments.
    • Adjusted the test command to handle file-matching patterns more reliably.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This 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.

Changes

Test expectations and script update

Layer / File(s) Summary
Bootstrap config test expectation updates
node_package/tests/bootstrap.config.test.js
Updates expected styleLoaders values to style-loader/css-loader/sass-loader, and rebuilds expected path fields (bootstrapCustomizations, preBootstrapCustomizations, configFilePath) using path.resolve with a testConfigsDir derived from __dirname; adds disableSassSourceMap and disableResolveUrlLoader as undefined in the expected result.
Test script glob quoting
package.json
Wraps the node_package/tests/**/*.test.js glob in quotes for the babel-tape-runner invocation in the test script.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: fixing configuration test failures and quoting the npm test glob.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes configuration test expectations and makes the test script glob portable.

  • Updates default loader expectations to match the config fixture.
  • Replaces hardcoded absolute test paths with resolved fixture paths.
  • Adds missing optional config fields to the expected object.
  • Quotes the recursive npm test glob so the test runner expands it.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
node_package/tests/bootstrap.config.test.js The expected config object now matches the implementation and avoids environment-specific absolute paths.
package.json The npm test script now passes the recursive glob to the test runner instead of relying on shell expansion.

Reviews (1): Last reviewed commit: "test: fix configuration test failures an..." | Re-trigger Greptile

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between e1aee79 and 2074cbc.

📒 Files selected for processing (2)
  • node_package/tests/bootstrap.config.test.js
  • package.json

Comment on lines +112 to +115
bootstrapCustomizations: path.resolve(
testConfigsDir,
'./path/to/bootstrap/customizations.scss'
),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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

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.

1 participant