refactor(line): extract node webhook handler + shared verification

This commit is contained in:
Peter Steinberger
2026-02-15 00:59:32 +01:00
parent abf42abd41
commit 2493455f08
6 changed files with 310 additions and 124 deletions

View File

@@ -1,7 +1,7 @@
import type { IncomingMessage } from "node:http";
import { EventEmitter } from "node:events";
import { describe, expect, it } from "vitest";
import { readLineWebhookRequestBody } from "./monitor.js";
import { readLineWebhookRequestBody } from "./webhook-node.js";
function createMockRequest(chunks: string[]): IncomingMessage {
const req = new EventEmitter() as IncomingMessage & { destroyed?: boolean; destroy: () => void };