Skip to content

chore: update tests and configuration - #825

Merged
danielroe merged 1 commit into
nuxt:mainfrom
userquin:fix-tests
Nov 13, 2026
Merged

danielroe merged 1 commit into
nuxt:mainfrom
userquin:fix-tests

Conversation

@userquin

@userquin userquin commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves #824

📚 Description

This PR includes:

  • add import process from node:process at build and unit specs
  • add the type to the Vitest config file: since we don't have Vite installed this PR uses ReturnType (TS9037: Default exports can't be inferred with --isolatedDeclarations)

@userquin
userquin requested a review from danielroe as a code owner November 13, 2026 16:50
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/module-builder/@nuxt/module-builder@825

commit: 8f0eaa2

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build and unit test files now import process from node:process. The Vitest configuration is assigned to a ReturnType<typeof defineConfig>-typed constant and exported separately. The existing test settings remain unchanged.

Estimated code review effort: 2 (Simple) | ~7 minutes

Severity of issue fixed: Low

Merge Risk: Minimal · up to 8f0ea

This change only tidies test typing and imports, so it has no production impact and is low risk to merge.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title "chore: update tests and configuration" is vague. It names the areas touched (tests and configuration) but not the actual change, which is importing Node's default process export in the buil… Replace the title with a specific description of the main change, for example: "fix: import process in test specs and type Vitest config export".
Passed Passed checks: 3 passed

Check name Status Explanation
Linked Issues check Passed Issue #824 has two coding requirements. (1) Build and unit specs use process without an import. At the reviewed head, test/build.spec.ts and test/unit.spec.ts both contain `import process from '…
Out of Scope Changes check Passed The pull request changes three files: test/build.spec.ts (one import line), test/unit.spec.ts (one import line), and vitest.config.mts (the typed config constant and its export). Each change a…
Description check Passed The description states the PR adds a process import from node:process to the build and unit specs and adds a type to the Vitest config to avoid TS9037 under isolatedDeclarations. This matches the …
Full details: Linked Issues check

Explanation

Issue #824 has two coding requirements. (1) Build and unit specs use process without an import. At the reviewed head, test/build.spec.ts and test/unit.spec.ts both contain import process from 'node:process', which resolves the reported warning. (2) TS9037 on the Vitest configuration default export under --isolatedDeclarations. At the reviewed head, vitest.config.mts declares const config: ReturnType&lt;typeof defineConfig&gt; = defineConfig({...}) and exports config as the default. The explicit annotation supplies the type that TS9037 requires. The test settings (coverage: {}, fileParallelism: false) are unchanged. Limitation: the TypeScript and WebStorm checks were not run. The PASS rests on source inspection only. The raw diff could not be read, so the file contents at head were used instead.

Full details: Out of Scope Changes check

Explanation

The pull request changes three files: test/build.spec.ts (one import line), test/unit.spec.ts (one import line), and vitest.config.mts (the typed config constant and its export). Each change applies directly to a requirement in #824. No unrelated behaviour, test expectations, or public declarations change, according to the supplied summary and the head file contents.

Full details: Description check

Explanation

The description states the PR adds a process import from node:process to the build and unit specs and adds a type to the Vitest config to avoid TS9037 under isolatedDeclarations. This matches the raw summary, which lists these same three file changes, so the description is related to the changeset and is not generic.

Full details: Title check

Explanation

The title "chore: update tests and configuration" is vague. It names the areas touched (tests and configuration) but not the actual change, which is importing Node's default process export in the build and unit specs and adding a type annotation to the Vitest configuration export to fix WebStorm warnings and TS9037 under isolatedDeclarations. The title is generic, so a teammate scanning history cannot tell the primary change.

Resolution

Replace the title with a specific description of the main change, for example: "fix: import process in test specs and type Vitest config export".

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f19398ec-40af-431b-ab04-cc1cf6d4aca3
Commits

Reviewing files that changed from the base of the PR and between f9f9367 and 8f0eaa2.

Files selected for processing: 3

  • test/build.spec.ts
  • test/unit.spec.ts
  • vitest.config.mts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@danielroe danielroe changed the title chore(test): update tests and configuration chore: update tests and configuration Nov 13, 2026
@danielroe
danielroe added this pull request to the merge queue Nov 13, 2026
Merged via the queue into nuxt:main with commit 9b3e432 Nov 13, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
@userquin
userquin deleted the fix-tests branch November 13, 2026 19:51
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.

WebStorm complaining about process and vitest configuration file

2 participants