Skip to content

Conversation

@huang-julien
Copy link
Member

🔗 Linked issue

📚 Description

This PR sets the locale to EN-GB for nuxt-time tests so contributors with any other locale would see their tests go green locally

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Sep 28, 2025

Walkthrough

The test file test/nuxt/nuxt-time.test.ts is updated to include a locale: 'en-GB' prop when rendering the NuxtTime component in multiple test cases. Corresponding expected HTML strings are amended to assert data-locale="en-GB" in server-side, hydration, and runtime render outputs. No modifications are made to control flow or error handling; assertions are expanded to validate the presence of the locale data attribute alongside existing attributes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly describes the core update—configuring the locale for nuxt-time tests—using the conventional commits format and avoiding unnecessary detail, making it clear and relevant to the changeset.
Description Check ✅ Passed The description clearly states that the PR sets the locale to EN-GB for nuxt-time tests to ensure consistency across contributor environments, directly reflecting the changes made in the test files.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tests/nuxttitmelocale

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 57a965f and 35543cd.

📒 Files selected for processing (1)
  • test/nuxt/nuxt-time.test.ts (5 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Follow standard TypeScript conventions and best practices

Files:

  • test/nuxt/nuxt-time.test.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Write unit tests for core functionality using vitest

Files:

  • test/nuxt/nuxt-time.test.ts
🔇 Additional comments (2)
test/nuxt/nuxt-time.test.ts (2)

13-38: Locale explicitly set for deterministic output

Setting locale: 'en-GB' ensures the rendered strings no longer depend on the reviewer’s system locale, so contributors in other regions keep getting consistent snapshots. Nicely targeted tweak.


104-127: SSR expectations tightened correctly

Extending the assertions to include data-locale="en-GB" verifies the server output matches the forced locale and keeps the hydration test aligned with the new contract. Good coverage bump.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 28, 2025

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@33343

nuxt

npm i https://pkg.pr.new/nuxt@33343

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@33343

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@33343

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@33343

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@33343

commit: 35543cd

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 28, 2025

CodSpeed Performance Report

Merging #33343 will not alter performance

Comparing tests/nuxttitmelocale (35543cd) with main (57a965f)

Summary

✅ 10 untouched

@danielroe danielroe merged commit b63adf6 into main Sep 29, 2025
83 of 85 checks passed
@danielroe danielroe deleted the tests/nuxttitmelocale branch September 29, 2025 08:49
@github-actions github-actions bot mentioned this pull request Sep 29, 2025
@github-actions github-actions bot mentioned this pull request Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants