1
mirror of https://github.com/jakejarvis/hoot.git synced 2025-10-18 14:24:26 -04:00

Update Vitest configuration to remove jsdom environment and add environment declarations to test files

This commit is contained in:
2025-10-12 00:02:03 -04:00
parent cc5140d08e
commit 224e079a7a
31 changed files with 27 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { CreateIssueButton } from "@/components/create-issue-button";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { DnsRecordList } from "@/components/domain/dns-record-list";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { DomainReportView } from "@/components/domain/domain-report-view";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { createElement } from "react";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { describe, expect, it, vi } from "vitest";
import { exportDomainData } from "./export-data";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { createElement } from "react";
import type { Mock } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { ProviderValue } from "./provider-value";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen, waitFor } from "@testing-library/react";
import { describe, expect, it } from "vitest";
import { RelativeExpiry } from "./relative-expiry";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { fireEvent, render, screen } from "@testing-library/react";
import type { Mock } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { createElement } from "react";
import type { Mock } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { CertificatesSection, equalHostname } from "./certificates-section";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { DnsRecordsSection } from "./dns-records-section";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { HeadersSection } from "./headers-section";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { HostingEmailSection } from "./hosting-email-section";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { formatRegistrant, RegistrationSection } from "./registration-section";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { createElement } from "react";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { createElement } from "react";
import { describe, expect, it, vi } from "vitest";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment jsdom */
import { render, screen } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { TtlBadge } from "./ttl-badge";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment node */
import { describe, expect, it } from "vitest";
import { isValidDomain, normalizeDomainInput } from "./domain";

View File

@@ -1,3 +1,4 @@
/* @vitest-environment node */
import { describe, expect, it } from "vitest";
import { formatDate, formatTtl } from "./format";

View File

@@ -1,5 +1,4 @@
/* @vitest-environment node */
import sharp from "sharp";
import { describe, expect, it } from "vitest";
import {

View File

@@ -1,3 +1,4 @@
/* @vitest-environment node */
import { describe, expect, it } from "vitest";
import {
detectCertificateAuthority,

View File

@@ -1,3 +1,4 @@
/* @vitest-environment node */
import { describe, expect, it } from "vitest";
import {
parseHtmlMeta,

View File

@@ -1,5 +1,4 @@
/* @vitest-environment node */
import type * as tls from "node:tls";
// Hoisted mock for node:tls to avoid ESM spy limitations

View File

@@ -1,5 +1,4 @@
/* @vitest-environment node */
import type { Mock } from "vitest";
import { afterEach, describe, expect, it, vi } from "vitest";
import { detectHosting } from "./hosting";

View File

@@ -5,7 +5,6 @@ import { coverageConfigDefaults, defineConfig } from "vitest/config";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
environment: "jsdom",
setupFiles: ["./vitest.setup.ts"],
css: true,
globals: true,