Skip to content

Conversation

jakejarvis
Copy link
Owner

No description provided.

…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.
@jakejarvis jakejarvis marked this pull request as ready for review September 26, 2025 15:25
@jakejarvis jakejarvis changed the title Update testing framework and improve project configuration: migrate tests to Vitest, add coverage reporting, and enhance README with updated test commands. Introduce Vitest configuration file and update VSCode settings for TypeScript support. Update testing framework to Vitest Sep 26, 2025
@jakejarvis jakejarvis requested a review from Copilot September 26, 2025 15:25
Copy link

@Copilot Copilot AI left a 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 and test to Vitest's expect and test/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";
Copy link

Copilot AI Sep 26, 2025

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.

Suggested change
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";
Copy link

Copilot AI Sep 26, 2025

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.

Suggested change
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";
Copy link

Copilot AI Sep 26, 2025

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.

Suggested change
import { normalizeRdap } from "./normalize.js";
import { normalizeRdap } from "../normalize.js";

Copilot uses AI. Check for mistakes.

@jakejarvis jakejarvis merged commit 174cae8 into main Sep 26, 2025
@jakejarvis jakejarvis deleted the feat/testing branch September 26, 2025 15:49
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