Files
start-os/sdk/package/lib/test/host.test.ts
Aiden McClelland 5e103770fd rename some things in the sdk (#2809)
* rename some things in the sdk

* fix docs

* rename some types exported from rust
2025-01-15 16:58:50 +00:00

30 lines
848 B
TypeScript

import { ServiceInterfaceBuilder } from "../../../base/lib/interfaces/ServiceInterfaceBuilder"
import { Effects } from "../../../base/lib/Effects"
import { sdk } from "../test/output.sdk"
describe("host", () => {
test("Testing that the types work", () => {
async function test(effects: Effects) {
const foo = sdk.MultiHost.of(effects, "foo")
const fooOrigin = await foo.bindPort(80, {
protocol: "http" as const,
preferredExternalPort: 80,
})
const fooInterface = new ServiceInterfaceBuilder({
effects,
name: "Foo",
id: "foo",
description: "A Foo",
type: "ui",
username: "bar",
path: "/baz",
search: { qux: "yes" },
schemeOverride: null,
masked: false,
})
await fooOrigin.export([fooInterface])
}
})
})