The delivery repository's contracts and SDK live under modules/ as mesh-delivery-contracts and mesh-delivery-sdk, their Go module paths renamed to match the folders (the TypeScript names already did), and every importer in mesh-delivery, mesh-catalog, mesh-host, mesh-tools and mesh-sdk follows in the same group: a design as it should be, one path per module, checked by the group's check building every importer. Builds: design 47 G §427, §88 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
23 lines
876 B
Go
23 lines
876 B
Go
package buildstep
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
// A TypeScript bundle's entrypoint x.js is started as x.serve.mjs beside it (novox/hq ADR 0193), the rule mesh-build-node
|
|
// and build-agent both apply; an entrypoint that is not .js gets none, and another language gets none.
|
|
func TestATypeScriptEntrypointIsStartedByTheLauncherBesideIt(t *testing.T) {
|
|
got := Launchers("typescript", []string{"index.js", "tools/x.js", "data.json"})
|
|
want := map[string]string{"index.js": "index.serve.mjs", "tools/x.js": "tools/x.serve.mjs"}
|
|
if !reflect.DeepEqual(got, want) {
|
|
t.Fatalf("Launchers(typescript) = %v, want %v", got, want)
|
|
}
|
|
if got := Launchers("go", []string{"index.js"}); len(got) != 0 {
|
|
t.Fatalf("a Go bundle got launchers: %v", got)
|
|
}
|
|
if got := Launchers("typescript", nil); len(got) != 0 {
|
|
t.Fatalf("a bundle with no entrypoint got launchers: %v", got)
|
|
}
|
|
}
|