Skip to content

✅ enhance comparison testing by improving output handling and adding dart2js support#56

Merged
techouse merged 2 commits into
mainfrom
chore/dart2js-test
Jun 6, 2026
Merged

✅ enhance comparison testing by improving output handling and adding dart2js support#56
techouse merged 2 commits into
mainfrom
chore/dart2js-test

Conversation

@techouse
Copy link
Copy Markdown
Owner

@techouse techouse commented Jun 6, 2026

This pull request improves the robustness and coverage of the cross-language comparison tests between the Dart and JavaScript implementations, ensuring output parity for both Dart VM and dart2js compiled code. It refactors the comparison script, introduces new Dart test harness files, and updates documentation and workflow to reflect these enhancements.

Comparison test improvements:

  • Refactored compare_outputs.sh to compare outputs from Node.js, Dart VM, and dart2js, ensuring all three environments produce identical results and providing clearer error messages. Temporary files are handled safely, and the script exits on any mismatch.
  • Added qs_dart2js.dart to enable running the comparison tests against Dart compiled to JavaScript (dart2js), using a base64-encoded environment variable for test cases.
  • Extracted comparison logic into comparison.dart and refactored qs.dart to use this shared code, reducing duplication and simplifying test case handling. [1] [2] [3]

Workflow and documentation updates:

  • Updated the GitHub Actions workflow to call the new compare_outputs.sh script instead of duplicating comparison logic inline.
  • Clarified in .github/copilot-instructions.md that comparison tests now check both Dart VM and dart2js against the JavaScript implementation.

Dependency update:

  • Updated pnpm version in package.json for the comparison test suite.

@techouse techouse self-assigned this Jun 6, 2026
@techouse techouse added the test label Jun 6, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 6, 2026

Worried about impact? Review this PR in Change Stack to explore blast radius before you approve or request changes.

Review Change Stack

Warning

Review limit reached

@techouse, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 45 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c816aef7-894e-469a-8f9f-0959202e1b1d

📥 Commits

Reviewing files that changed from the base of the PR and between 013e280 and c8587da.

📒 Files selected for processing (7)
  • .github/copilot-instructions.md
  • .github/workflows/test.yml
  • test/comparison/compare_outputs.sh
  • test/comparison/comparison.dart
  • test/comparison/package.json
  • test/comparison/qs.dart
  • test/comparison/qs_dart2js.dart
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/dart2js-test

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.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Jun 6, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (013e280) 1423 1391 97.75%
Head commit (c8587da) 1423 (+0) 1391 (+0) 97.75% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#56) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.75%. Comparing base (013e280) to head (c8587da).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #56   +/-   ##
=======================================
  Coverage   97.75%   97.75%           
=======================================
  Files          20       20           
  Lines        1423     1423           
=======================================
  Hits         1391     1391           
  Misses         32       32           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@techouse techouse merged commit 4fd6e95 into main Jun 6, 2026
17 of 18 checks passed
@techouse techouse deleted the chore/dart2js-test branch June 6, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant