Skip to content

Conversation

@adrianschmidt
Copy link
Contributor

@adrianschmidt adrianschmidt commented Jan 20, 2026

Adds a test runner wrapper script that automatically enables verbose output when debug logging is enabled.

The wrapper detects ACTIONS_STEP_DEBUG, RUNNER_DEBUG, or DEBUG env vars and adds the --verbose flag to the stencil test command.

Summary by CodeRabbit

  • Tests
    • Test execution now uses a new Node-based test runner (replacing prior invocation).
    • Debugging support improved: enabling debug env vars increases verbosity.
    • Runner logs the invoked command, better propagates process exit codes and termination signals for clearer CI behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

Review:

  • Commits are atomic
  • Commits have the correct type for the changes made
  • Commits with breaking changes are marked as such

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

  • Chrome
  • Edge
  • Firefox

Linux:

  • Chrome
  • Firefox

macOS:

  • Chrome
  • Firefox
  • Safari

Mobile:

  • Chrome on Android
  • iOS

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

Replaces the package.json test script to run a new Node.js wrapper (scripts/run-tests.cjs) which builds arguments for and spawns the Stencil CLI, sets SASS_PATH, appends --verbose when debug env vars are set, and forwards exit codes and signals.

Changes

Cohort / File(s) Summary
Test Script Configuration
package.json
test script changed from cross-env-shell SASS_PATH=node_modules "stencil test --spec --e2e" to node scripts/run-tests.cjs
Test Runner Wrapper
scripts/run-tests.cjs
New Node.js runner that: detects debug via ACTIONS_STEP_DEBUG, RUNNER_DEBUG, or DEBUG; constructs base args ['test','--spec','--e2e'] plus CLI args; logs and spawns the stencil process with SASS_PATH=node_modules; propagates numeric exit codes and re-emits terminating signals; exits with code 1 for other failures

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer (npm test)
  participant NPM as npm
  participant Runner as Node script\nscripts/run-tests.cjs
  participant Stencil as stencil CLI
  participant OS as Operating System

  Dev->>NPM: run `npm test`
  NPM->>Runner: invoke `node scripts/run-tests.cjs` (env passed)
  Runner->>Runner: read env (ACTIONS_STEP_DEBUG, RUNNER_DEBUG, DEBUG)\nbuild args ['test','--spec','--e2e'] + CLI args\nset SASS_PATH=node_modules
  Runner->>Stencil: spawn `stencil` with args (stdio: inherit)
  Stencil->>OS: execute tests
  Stencil-->>Runner: exit code or signal
  alt exited with numeric code
    Runner->>NPM: exit with same code
  else terminated by signal
    Runner->>OS: re-emit same signal
  else other failure
    Runner->>NPM: exit 1
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately reflects the main change: adding a wrapper script that enables verbose test output when GitHub Actions debug logging is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-verbose-test-logging

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.

@github-actions
Copy link

Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3788/

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@scripts/run-tests.cjs`:
- Around line 11-18: The Windows runner fails because stencilBin points to
node_modules/.bin/stencil (a .cmd shim) which spawnSync cannot execute directly;
update the CLI resolution in scripts/run-tests.cjs by replacing the path-based
stencilBin with a cross-platform resolution using
require.resolve('@stencil/core/bin/stencil') and invoke it via process.execPath
(so spawnSync runs node with the resolved script), or alternatively keep
stencilBin but pass { shell: true } into the existing spawnSync call that uses
stencilBin; update references to stencilBin and the spawnSync invocation
accordingly (look for the stencilBin variable and the spawnSync call that runs
the Stencil CLI).

@adrianschmidt adrianschmidt force-pushed the add-verbose-test-logging branch from e825146 to 954cb88 Compare January 20, 2026 19:48
…enabled

Adds a test runner wrapper script that automatically enables verbose
output when debug logging is enabled.

The wrapper detects ACTIONS_STEP_DEBUG, RUNNER_DEBUG, or DEBUG env vars
and adds the --verbose flag to the stencil test command.
@adrianschmidt adrianschmidt force-pushed the add-verbose-test-logging branch from 954cb88 to a77f57d Compare January 20, 2026 19:54
@adrianschmidt
Copy link
Contributor Author

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

✅ Actions performed

Full review triggered.

@adrianschmidt adrianschmidt enabled auto-merge (rebase) January 20, 2026 20:00
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