diff --git a/packages/workers-shared/asset-worker/tests/html-handling.test.ts b/packages/workers-shared/asset-worker/tests/html-handling.test.ts index 3ec0b9690476..ef9f6bb995db 100644 --- a/packages/workers-shared/asset-worker/tests/html-handling.test.ts +++ b/packages/workers-shared/asset-worker/tests/html-handling.test.ts @@ -17,6 +17,7 @@ const existsMock = (fileList: Set) => { if (fileList.has(pathname)) { return pathname; } + return null; } ); }; @@ -33,7 +34,7 @@ const testSuites = [ }, ]; -describe.each(testSuites)("$title", ({ title, suite }) => { +describe.each(testSuites)("$title", ({ suite }) => { beforeEach(() => { vi.mocked(getAssetWithMetadataFromKV).mockImplementation( () => @@ -64,7 +65,7 @@ describe.each(testSuites)("$title", ({ title, suite }) => { async ({ files, requestPath, matchedFile, finalPath }) => { existsMock(new Set(files)); const request = new IncomingRequest(BASE_URL + requestPath); - let response = await SELF.fetch(request); + const response = await SELF.fetch(request); if (matchedFile && finalPath) { expect(getAssetWithMetadataFromKV).toBeCalledTimes(1); expect(getAssetWithMetadataFromKV).toBeCalledWith( diff --git a/packages/workers-shared/asset-worker/tests/test-cases/encoding-test-cases.ts b/packages/workers-shared/asset-worker/tests/test-cases/encoding-test-cases.ts index 6cf6a23d5053..34436418b2f0 100644 --- a/packages/workers-shared/asset-worker/tests/test-cases/encoding-test-cases.ts +++ b/packages/workers-shared/asset-worker/tests/test-cases/encoding-test-cases.ts @@ -1,4 +1,4 @@ -import { TestCase } from "./test-case"; +import type { TestCase } from "./test-case"; export const encodingTestCases: { html_handling: diff --git a/packages/workers-shared/asset-worker/tests/test-cases/html-handling-test-cases.ts b/packages/workers-shared/asset-worker/tests/test-cases/html-handling-test-cases.ts index 14ec704857a5..e675d9e5e304 100644 --- a/packages/workers-shared/asset-worker/tests/test-cases/html-handling-test-cases.ts +++ b/packages/workers-shared/asset-worker/tests/test-cases/html-handling-test-cases.ts @@ -1,4 +1,4 @@ -import { TestCase } from "./test-case"; +import type { TestCase } from "./test-case"; export const htmlHandlingTestCases: { html_handling: diff --git a/packages/workers-shared/package.json b/packages/workers-shared/package.json index dafd66c46833..a33971a07130 100644 --- a/packages/workers-shared/package.json +++ b/packages/workers-shared/package.json @@ -32,7 +32,7 @@ "check:type": "pnpm run check:type:package && pnpm run check:type:asset-worker && pnpm run check:type:router-worker", "check:type:asset-worker": "tsc -p ./asset-worker/tsconfig.json && tsc -p ./asset-worker/tests/tsconfig.json", "check:type:package": "tsc -p ./tsconfig.json && tsc -p ./tsconfig.node.json", - "check:type:router-worker": "tsc -p ./router-worker/tsconfig.json && tsc -p ./router-worker/tests/tsconfig.json", + "check:type:router-worker": "tsc -p ./router-worker/tsconfig.json", "clean": "rimraf dist", "deploy": "pnpm run deploy:router-worker && pnpm run deploy:asset-worker", "deploy:asset-worker": "CLOUDFLARE_API_TOKEN=$WORKERS_DEPLOY_AND_CONFIG_CLOUDFLARE_API_TOKEN pnpx wrangler versions upload --experimental-versions -c asset-worker/wrangler.toml", diff --git a/packages/workers-shared/tsconfig.json b/packages/workers-shared/tsconfig.json index cd731beefbe6..609d161c8048 100644 --- a/packages/workers-shared/tsconfig.json +++ b/packages/workers-shared/tsconfig.json @@ -12,6 +12,6 @@ "strict": true, "skipLibCheck": true }, - "include": ["utils/*.ts"], + "include": ["utils/*.ts", "index.ts"], "exclude": ["scripts/**"] }