Files
loldle/web/vitest.config.js
T
tiennm99 078d80c962 refactor: port lib layer to src/lib
classic-mode.js moves byte-for-byte. champion-data.js swaps the Next.js
env-var fetch prefix for asset() from $app/paths, which resolves to
/champions.json in dev and /loldle/champions.json in the deployed build.
getChampionImageUrl keeps returning an absolute Data Dragon URL, unwrapped.

Drops three exports with no callers: getAllChampions, getChampionByName,
getGuessedNames.

The characterization suite passes unchanged against the new location -- only
import specifiers moved, no assertions touched.
2026-07-25 11:01:40 +07:00

17 lines
435 B
JavaScript

import { fileURLToPath } from "node:url";
import { defineConfig } from "vitest/config";
export default defineConfig({
resolve: {
// Vitest does not read svelte.config.js, so $lib must be declared here too.
alias: {
$lib: fileURLToPath(new URL("./src/lib", import.meta.url)),
},
},
test: {
environment: "node",
setupFiles: ["./test/setup-local-storage.js"],
include: ["test/**/*.test.js"],
},
});