GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — hexcanvas/vitest.config.ts at main · htcom-code/hexcanvas

Expand file tree

/

vitest.config.ts

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
59 lines (56 loc) · 2.35 KB
/

vitest.config.ts

Copy path

File metadata and controls

59 lines (56 loc) · 2.35 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import { fileURLToPath } from "node:url";
import { playwright } from "@vitest/browser-playwright";
import { defineConfig } from "vitest/config";
const source = (path: string) => fileURLToPath(new URL(`./packages/${path}/src/index.ts`, import.meta.url));
/**
* Bindings import each other by package name, which would resolve to `dist` and
* make every browser run depend on a fresh build. Pointing the names at `src`
* keeps the suite honest about the working tree instead.
*/
const alias = {
"@hexcanvas/core": source("core"),
"@hexcanvas/element": source("element"),
"@hexcanvas/react": source("react"),
"@hexcanvas/vue": source("vue"),
"@hexcanvas/svelte": source("svelte"),
};
export default defineConfig({
test: {
projects: [
{
// Logic that needs no DOM. Fast, and the only project CI's alpine image runs.
test: {
name: "core",
include: ["packages/*/test/**/*.test.ts"],
benchmark: { include: ["packages/*/bench/**/*.bench.ts"] },
environment: "node",
},
},
{
resolve: { alias },
// Named up front: discovering them mid-run reloads the page and vitest
// warns that the reload can make a test flake.
optimizeDeps: { include: ["react", "react-dom/client", "react/jsx-dev-runtime", "vue"] },
test: {
name: "browser",
// `.tsx` as well, because the playground is a React app and the tests
// that keep it honest mount it rather than poking at its DOM.
include: ["test/browser/**/*.test.ts", "test/browser/**/*.test.tsx"],
browser: {
enabled: true,
provider: playwright(),
headless: true,
screenshotFailures: false,
// All three engines. There are only three, and each disagreed about
// something nothing else here would notice: the same font string measures
// 7.83px a character on chromium and 8.04px on WebKit; WebKit does not put
// a `tabindex` element in the tab order unless Full Keyboard Access is on;
// and Firefox hands back a scroll offset of 10999.65 for the 11000 you
// assigned, which used to put the wrong row at the top.
instances: [{ browser: "chromium" }, { browser: "webkit" }, { browser: "firefox" }],
},
},
},
],
},
});
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.