Skip to content

fix: populate static API routes for our staticRouteMatcher #1247

fix: populate static API routes for our staticRouteMatcher

fix: populate static API routes for our staticRouteMatcher #1247

Triggered via pull request May 23, 2025 11:07
Status Failure
Total duration 43s
Artifacts

check.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 1 warning
validate
Process completed with exit code 1.
packages/tests-unit/tests/core/routing/routeMatcher.test.ts: packages/open-next/src/core/routing/routeMatcher.ts#L62
Error: [vitest] No "getStaticAPIRoutes" export is defined on the "@opennextjs/aws/adapters/config/index.js" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock(import("@opennextjs/aws/adapters/config/index.js"), async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ packages/open-next/src/core/routing/routeMatcher.ts:62:6 ❯ packages/tests-unit/tests/core/routing/routeMatcher.test.ts:65:25
packages/tests-unit/tests/core/routing/matcher.test.ts: packages/open-next/src/core/routing/routeMatcher.ts#L62
Error: [vitest] No "getStaticAPIRoutes" export is defined on the "@opennextjs/aws/adapters/config/index.js" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock(import("@opennextjs/aws/adapters/config/index.js"), async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ packages/open-next/src/core/routing/routeMatcher.ts:62:6 ❯ packages/open-next/src/core/routing/matcher.ts:7:31
validate
tests-unit#test: command (/home/runner/work/opennextjs-aws/opennextjs-aws/packages/tests-unit) pnpm run test exited (1)
validate
Couldn't write a comment to the pull request. Please make sure your job has the permission 'pull-requests: write'. Original Error was: [HttpError] - Resource not accessible by integration - https://docs.github.com/rest/issues/comments#create-an-issue-comment