test(relay): keep the stage slug helper private (#9998)

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-05 00:25:45 -07:00
1 parent ba873b8181
commit ac93fbfad0
2 files changed
+1 -8

No files matched your search

-7
View File
@@ -11,17 +11,10 @@ import {
RelayPublicDomainLabelTooLongError,
relayPublicDomainForStage,
relayResourceNameForStage,
relayStageSlug,
} from "./deploymentConfig.ts";
const isRelayPublicDomainLabelTooLongError = Schema.is(RelayPublicDomainLabelTooLongError);
describe("relayStageSlug", () => {
it("matches Alchemy physical-name sanitization for default developer stages", () => {
expect(relayStageSlug("dev_julius")).toBe("dev-julius");
});
});
describe("relayPublicDomainForStage", () => {
it("uses the canonical relay hostname for production", () => {
expect(relayPublicDomainForStage("prod", ".example.com.")).toBe("relay.example.com");
+1 -1
View File
@@ -56,7 +56,7 @@ function appendDnsSafeSuffix(prefix: string, suffix: string): string {
* Alchemy's physical-name helper sanitizes resource names after adding the
* stage. Keep custom domains and runtime-created resources aligned with it.
*/
export function relayStageSlug(stage: string): string {
function relayStageSlug(stage: string): string {
return stage
.toLowerCase()
.replaceAll(/[^a-z0-9-]/g, "-")