-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvitest.config.ts
More file actions
31 lines (30 loc) · 1.48 KB
/
vitest.config.ts
File metadata and controls
31 lines (30 loc) · 1.48 KB
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
import { defineConfig } from "vitest/config";
import { resolve } from "node:path";
export default defineConfig({
test: {
// Sandbox initialization can take a few seconds on first run
testTimeout: 30_000,
// Only run tests from this project, not from deps/
include: ["tests/**/*.test.ts"],
// Exclude compiled build artefacts and dependency clones
exclude: ["dist/**", "node_modules/**", "deps/**"],
},
resolve: {
alias: {
// Map ha:* module imports to builtin-modules/ for standalone testing.
// In the sandbox these are resolved by the hyperlight-js UserModuleLoader.
"ha:ooxml-core": resolve(__dirname, "builtin-modules/ooxml-core.js"),
"ha:xml-escape": resolve(__dirname, "builtin-modules/xml-escape.js"),
"ha:str-bytes": resolve(__dirname, "builtin-modules/str-bytes.js"),
"ha:crc32": resolve(__dirname, "builtin-modules/crc32.js"),
"ha:base64": resolve(__dirname, "builtin-modules/base64.js"),
// ha:ziplib is a native Rust module — use Node.js zlib shim for vitest
"ha:ziplib": resolve(__dirname, "tests/shims/ziplib.shim.js"),
"ha:shared-state": resolve(__dirname, "builtin-modules/shared-state.js"),
"ha:zip-format": resolve(__dirname, "builtin-modules/zip-format.js"),
"ha:pptx": resolve(__dirname, "builtin-modules/pptx.js"),
"ha:pptx-charts": resolve(__dirname, "builtin-modules/pptx-charts.js"),
"ha:pptx-tables": resolve(__dirname, "builtin-modules/pptx-tables.js"),
},
},
});