From 170cbaa09949cf858a70cd3b28546ae629af96ff Mon Sep 17 00:00:00 2001 From: Luke Shay Date: Thu, 16 Nov 2023 19:05:55 -0600 Subject: [PATCH] fixed tests --- .github/workflows/ci.yml | 1 + packages/adapter/src/__tests__/index.test.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29a0c96..9370b2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: matrix: node_version: - 18 + - 20 cmd: - build - test diff --git a/packages/adapter/src/__tests__/index.test.ts b/packages/adapter/src/__tests__/index.test.ts index d8b458e..5191719 100644 --- a/packages/adapter/src/__tests__/index.test.ts +++ b/packages/adapter/src/__tests__/index.test.ts @@ -22,6 +22,9 @@ describe("index.ts", () => { describe("getAdapter", () => { const args: Args = { binaryMediaTypes: [faker.string.sample()], + esBuildOptions: {}, + locals: {}, + mode: "ssr", } describe("when there are arguments", () => { @@ -36,10 +39,12 @@ describe("index.ts", () => { args: { ...args, esBuildOptions: {}, + locals: {}, + mode: "ssr", }, exports: ["handler"], name: ADAPTER_NAME, - serverEntrypoint: `${ADAPTER_NAME}/lambda/index.js`, + serverEntrypoint: `${ADAPTER_NAME}/lambda/handlers/ssr.js`, supportedAstroFeatures: { assets: { isSharpCompatible: false, @@ -66,10 +71,12 @@ describe("index.ts", () => { args: { binaryMediaTypes: [], esBuildOptions: {}, + locals: {}, + mode: "ssr", }, exports: ["handler"], name: ADAPTER_NAME, - serverEntrypoint: `${ADAPTER_NAME}/lambda/index.js`, + serverEntrypoint: `${ADAPTER_NAME}/lambda/handlers/ssr.js`, supportedAstroFeatures: { assets: { isSharpCompatible: false, @@ -210,6 +217,8 @@ describe("index.ts", () => { { ...args, esBuildOptions: {}, + locals: {}, + mode: "ssr", }, ) })