Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Remove hack for `happy-dom`
Sebastian Martinez committed 2 years ago
commit dbad9ddeefb911dc9e88bf113152d8c442ada8d4
parent 40f2b3e51607a7b83abb6d3d2bdd5657d0c71d8f
2 files changed +0 -10
deleted tests/support/setupVitest.ts
@@ -1,9 +0,0 @@
-
// Found in https://github.com/belgattitude/nextjs-monorepo-example/pull/2913
-
// Hack for vitest 0.25.2 / happy-dom. Keep till those issues are fixed
-
// - https://github.com/vitest-dev/vitest/issues/2305#issuecomment-1311420462
-
// - https://github.com/capricorn86/happy-dom/issues/569
-

-
import { URL } from "node:url";
-
//@ts-expect-error The two types don't match, but for this hack we have to
-
//overwrite the given URL by happy-dom with the URL class passed by Node
-
globalThis.URL = URL;
modified vite.config.ts
@@ -8,7 +8,6 @@ import { svelte } from "@sveltejs/vite-plugin-svelte";

export default defineConfig({
  test: {
-
    setupFiles: "./tests/support/setupVitest",
    environment: "happy-dom",
    include: ["tests/unit/**/*.test.ts"],
    reporters: "verbose",