mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
33 lines
898 B
TypeScript
33 lines
898 B
TypeScript
import { ServiceInterfaceBuilder } from "../interfaces/ServiceInterfaceBuilder"
|
|
import { Effects } from "../types"
|
|
import { createUtils } from "../util"
|
|
|
|
describe("host", () => {
|
|
test("Testing that the types work", () => {
|
|
async function test(effects: Effects) {
|
|
const utils = createUtils<never, never>(effects)
|
|
const foo = utils.host.multi("foo")
|
|
const fooOrigin = await foo.bindPort(80, {
|
|
protocol: "http" as const,
|
|
scheme: null,
|
|
})
|
|
const fooInterface = new ServiceInterfaceBuilder({
|
|
effects,
|
|
name: "Foo",
|
|
id: "foo",
|
|
description: "A Foo",
|
|
hasPrimary: false,
|
|
disabled: false,
|
|
type: "ui",
|
|
username: "bar",
|
|
path: "/baz",
|
|
search: { qux: "yes" },
|
|
schemeOverride: null,
|
|
masked: false,
|
|
})
|
|
|
|
await fooOrigin.export([fooInterface])
|
|
}
|
|
})
|
|
})
|