-
Notifications
You must be signed in to change notification settings - Fork 0
Update testing framework to Vitest #4
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
Conversation
…ests to Vitest, add coverage reporting, and enhance README with updated test commands. Introduce Vitest configuration file and update VSCode settings for TypeScript support.
…fix handling, RDAP orchestration, referral behavior, and date normalization
…n package.json, adjust Vitest settings for smoke tests, and mock RDAP bootstrap in orchestration tests.
…ed test files for multi-label public suffix, orchestration, and referral behavior, and ensure proper newline at the end of package.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates the project's testing framework from Node.js's built-in test runner to Vitest for improved testing capabilities and developer experience.
- Migrates all test files from Node.js
assert
andtest
to Vitest'sexpect
andtest
/describe
APIs - Adds comprehensive Vitest configuration with coverage support and environment settings
- Restructures test organization with better mocking capabilities for integration tests
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
vitest.config.ts | New Vitest configuration file with test environment, coverage, and timeout settings |
src/whois/normalize.test.ts | Migrated from Node.js assert to Vitest expect assertions |
src/rdap/normalize.test.ts | Migrated from Node.js assert to Vitest expect assertions |
src/lib/domain.test.ts | New test file using Vitest API for domain utility functions |
src/lib/dates.test.ts | Migrated from Node.js assert to Vitest expect assertions with path corrections |
src/lib/tests/domain.test.ts | Removed old test file (relocated to src/lib/domain.test.ts) |
src/index.test.ts | New comprehensive integration test suite with Vitest mocking |
src/index.smoke.test.ts | Migrated smoke tests from Node.js assert to Vitest expect |
package.json | Updated test scripts and added Vitest dependencies |
README.md | Updated development documentation to reflect Vitest usage |
.vscode/settings.json | New VS Code configuration for TypeScript and Biome formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
import test from "node:test"; | ||
import { toISO } from "../dates.js"; | ||
import { expect, test } from "vitest"; | ||
import { toISO } from "./dates.js"; |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path is incorrect. Based on the file structure, it should be ../dates.js
to import from the parent directory, not ./dates.js
which would look for a file in the same directory.
import { toISO } from "./dates.js"; | |
import { toISO } from "../dates.js"; |
Copilot uses AI. Check for mistakes.
import test from "node:test"; | ||
import { normalizeWhois } from "../normalize.js"; | ||
import { expect, test } from "vitest"; | ||
import { normalizeWhois } from "./normalize.js"; |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path is incorrect. Based on the file structure, it should be ../normalize.js
to import from the parent directory, not ./normalize.js
which would look for a file in the same directory.
import { normalizeWhois } from "./normalize.js"; | |
import { normalizeWhois } from "../normalize.js"; |
Copilot uses AI. Check for mistakes.
import test from "node:test"; | ||
import { normalizeRdap } from "../normalize.js"; | ||
import { expect, test } from "vitest"; | ||
import { normalizeRdap } from "./normalize.js"; |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path is incorrect. Based on the file structure, it should be ../normalize.js
to import from the parent directory, not ./normalize.js
which would look for a file in the same directory.
import { normalizeRdap } from "./normalize.js"; | |
import { normalizeRdap } from "../normalize.js"; |
Copilot uses AI. Check for mistakes.
No description provided.