From 128f9ac231c9e6ba2cadc03fa4212e42c0fb255d Mon Sep 17 00:00:00 2001 From: Andrew Anderson Date: Mon, 5 Oct 2026 15:48:32 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20netlify:=20move=20nps.test.ts=20?= =?UTF-8?q?out=20of=20the=20functions=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Netlify treats every file in netlify/functions as a deployable function and rejects the name 'nps.test' (dots are not allowed), which has failed every production deploy since #202 landed. Move the test beside the relay tests and point its imports back at the function. Signed-off-by: Andrew Anderson --- netlify/{functions => nps-relay}/nps.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename netlify/{functions => nps-relay}/nps.test.ts (95%) diff --git a/netlify/functions/nps.test.ts b/netlify/nps-relay/nps.test.ts similarity index 95% rename from netlify/functions/nps.test.ts rename to netlify/nps-relay/nps.test.ts index 88e4ccd..526c1dd 100644 --- a/netlify/functions/nps.test.ts +++ b/netlify/nps-relay/nps.test.ts @@ -7,12 +7,12 @@ const { getStore, handleRelayRequest } = vi.hoisted(() => ({ vi.mock("@netlify/blobs", () => ({ getStore })); -vi.mock("../nps-relay/relay", async importOriginal => { - const actual = await importOriginal(); +vi.mock("./relay", async importOriginal => { + const actual = await importOriginal(); return { ...actual, handleRelayRequest }; }); -import handler, { config } from "./nps.mjs"; +import handler, { config } from "../functions/nps.mjs"; import { ACK_PATH, HUB_SECRET_HASH_ENV, @@ -21,7 +21,7 @@ import { RELAY_BASE_PATH, STORE_NAME, type RelayDeps, -} from "../nps-relay/relay"; +} from "./relay"; const ORIGIN = "https://relay.test"; const CONTEXT_IP = "203.0.113.7";