EMS update
This commit is contained in:
@@ -243,7 +243,9 @@ describe("Footer", () => {
|
||||
render(<Footer />);
|
||||
|
||||
// Get specific links that should have focus management
|
||||
const emailLink = screen.getByRole("link", { name: "medlab@colorado.edu" });
|
||||
const emailLinks = screen.getAllByRole("link", {
|
||||
name: "medlab@colorado.edu",
|
||||
});
|
||||
const blueskyLink = screen.getByRole("link", {
|
||||
name: "Follow us on Bluesky",
|
||||
});
|
||||
@@ -251,7 +253,8 @@ describe("Footer", () => {
|
||||
name: "Follow us on GitLab",
|
||||
});
|
||||
|
||||
// Check email link
|
||||
// Check email links (multiple due to responsive design)
|
||||
emailLinks.forEach((emailLink) => {
|
||||
expect(emailLink).toHaveClass("focus:outline-none");
|
||||
expect(emailLink).toHaveClass("focus:ring-2");
|
||||
expect(emailLink).toHaveClass("focus:ring-offset-2");
|
||||
@@ -261,6 +264,7 @@ describe("Footer", () => {
|
||||
expect(emailLink).toHaveClass(
|
||||
"focus:ring-offset-[var(--color-surface-default-primary)]"
|
||||
);
|
||||
});
|
||||
|
||||
// Check social media links
|
||||
[blueskyLink, gitlabLink].forEach((link) => {
|
||||
|
||||
@@ -1,29 +1,22 @@
|
||||
const { defineConfig } = require("vitest/config");
|
||||
const react = require("@vitejs/plugin-react");
|
||||
import { defineConfig } from "vitest/config";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
module.exports = defineConfig({
|
||||
plugins: [
|
||||
// Enables React transform
|
||||
react({ jsxRuntime: "automatic" }),
|
||||
],
|
||||
|
||||
// Key part: make .js be parsed as JSX *before* import-analysis
|
||||
export default defineConfig({
|
||||
plugins: [react({ jsxRuntime: "automatic" })],
|
||||
esbuild: {
|
||||
jsx: "automatic",
|
||||
loader: "jsx", // default loader
|
||||
include: /(?:^|\/)(app|components|pages|src|tests)\/.*\.[jt]sx?$/, // match your folders
|
||||
loader: "jsx",
|
||||
include: /\.[jt]sx?$/,
|
||||
exclude: [/node_modules/],
|
||||
},
|
||||
|
||||
test: {
|
||||
environment: "jsdom",
|
||||
setupFiles: ["./vitest.setup.ts"], // match your actual filename
|
||||
setupFiles: ["./vitest.setup.ts"],
|
||||
include: [
|
||||
"tests/unit/**/*.test.{js,jsx,ts,tsx}",
|
||||
"tests/integration/**/*.test.{js,jsx,ts,tsx}",
|
||||
],
|
||||
css: true,
|
||||
transformMode: { web: [/\.[jt]sx?$/] }, // ensure web transform for JSX
|
||||
coverage: {
|
||||
provider: "v8",
|
||||
reporter: ["text", "lcov"],
|
||||
Reference in New Issue
Block a user