Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to @nuxt/test-utils alpha #104

Merged
merged 3 commits into from
Dec 13, 2023
Merged

Conversation

danielroe
Copy link
Owner

@danielroe danielroe commented Dec 13, 2023

Following the steps in nuxt/test-utils#644, this PR migrates to the latest alpha of @nuxt/test-utils which includes nuxt-vitest.

It's primarily intended for testing any potential regressions prior to release.

Summary by CodeRabbit

  • Refactor

    • Updated the testing module to use @nuxt/test-utils/module for enhanced testing capabilities.
  • Tests

    • Modified test setup imports to align with the new testing utilities structure.
  • Documentation

    • Adjusted HTML meta tags and link attributes for consistency and clarity in the project's documentation.

Copy link

coderabbitai bot commented Dec 13, 2023

Walkthrough

The updates reflect a consolidation of Nuxt's testing utilities, with the nuxt-vitest module being integrated into @nuxt/test-utils. This change streamlines the testing setup for Nuxt applications by centralizing the utilities and configurations under the official Nuxt namespace, enhancing support and potentially simplifying future maintenance and updates.

Changes

File Path Change Summary
.nuxtrc Replaced nuxt-vitest module with @nuxt/test-utils/module.
test/e2e.spec.ts Updated import statement to @nuxt/test-utils/e2e; no changes in HTML content.
vitest.config.mjs Updated import path from 'nuxt-vitest/config' to '@nuxt/test-utils/config'.

Related issues

  • Project status nuxt-vitest#410: This PR seems to be part of the migration process mentioned in the issue, as it involves the transition from nuxt-vitest to @nuxt/test-utils.

Poem

In the code where tests abide,
🐇 Hops the rabbit, filled with pride.
Modules merge, and paths align,
🌟 Nuxt's tests, now more divine.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
vitest 0.34.6...1.0.4 None +0/-0 1.32 MB oreanno

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 729b30b and e9d736f.
Files ignored due to filter (2)
  • package.json
  • pnpm-lock.yaml
Files selected for processing (3)
  • .nuxtrc (1 hunks)
  • test/e2e.spec.ts (2 hunks)
  • vitest.config.mjs (1 hunks)
Additional comments: 4
.nuxtrc (1)
  • 2-2: The update to the module declaration in .nuxtrc appears to be correct and aligns with the PR's objective to migrate to @nuxt/test-utils. Ensure that no additional configuration is required for the new module to function as expected.
test/e2e.spec.ts (2)
  • 3-3: The updated import statement aligns with the PR's objective to migrate to @nuxt/test-utils alpha version.

  • 39-71: Ensure that the inline snapshot changes in lines 39-71 are intentional and accurately reflect the expected output after migrating to the new version of @nuxt/test-utils.

vitest.config.mjs (1)
  • 1-1: Verify that the function defineVitestConfig exists in the @nuxt/test-utils/config module and is correctly exported.

@danielroe danielroe merged commit ebf93a3 into main Dec 13, 2023
7 checks passed
@danielroe danielroe deleted the nuxt-vitest-migration branch December 13, 2023 18:04
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