| 1 | import * as Hetzner from "@/Hetzner"; |
| 2 | import { describe, expect, it } from "alchemy-test"; |
| 3 | |
| 4 | describe( |
| 5 | "Hetzner.Website prop surfaces", |
| 6 | { tags: ["unit", "provider:hetzner", "provider:hetzner:website", "local"] }, |
| 7 | () => { |
| 8 | const _pins = [ |
| 9 | () => |
| 10 | Hetzner.Website.Vinext("Vinext", { |
| 11 | rootDir: "./app", |
| 12 | env: { GREETING: "Hello" }, |
| 13 | memo: { lockfile: true }, |
| 14 | assets: { notFoundHandling: "404-page" }, |
| 15 | dev: {}, |
| 16 | domain: "app.example.com", |
| 17 | }), |
| 18 | () => |
| 19 | Hetzner.Website.Vite("V", { |
| 20 | assets: { notFoundHandling: "single-page-application" }, |
| 21 | vite: { outDir: "build" }, |
| 22 | }), |
| 23 | () => |
| 24 | Hetzner.Website.Vite("V", { |
| 25 | // @ts-expect-error spa sugar replaced by assets.notFoundHandling |
| 26 | spa: true, |
| 27 | }), |
| 28 | () => |
| 29 | Hetzner.Website.Waku("W", { |
| 30 | waku: { srcDir: "app" }, |
| 31 | }), |
| 32 | () => |
| 33 | Hetzner.Website.Waku("W", { |
| 34 | // @ts-expect-error srcDir lives on the waku bag |
| 35 | srcDir: "app", |
| 36 | }), |
| 37 | () => |
| 38 | Hetzner.Website.Astro("A", { |
| 39 | astro: { output: "static" }, |
| 40 | assets: { notFoundHandling: "404-page" }, |
| 41 | }), |
| 42 | () => |
| 43 | Hetzner.Website.Nuxt("N", { |
| 44 | nuxt: { app: { baseURL: "/docs/" } }, |
| 45 | }), |
| 46 | () => |
| 47 | Hetzner.Website.SvelteKit("S", { |
| 48 | kit: { paths: { base: "/docs" } }, |
| 49 | }), |
| 50 | ]; |
| 51 | |
| 52 | it("rejects dissolved 1353 props at the type level", () => { |
| 53 | expect(_pins.length).toBeGreaterThan(0); |
| 54 | }); |
| 55 | }, |
| 56 | ); |