replace early returns with NotFoundError

test /api/webhook/incoming-message
This commit is contained in:
m5r
2021-08-02 21:43:27 +08:00
parent 827ed9f1c0
commit 2cf53533a3
11 changed files with 223 additions and 28 deletions

View File

@ -1,4 +1,17 @@
// This is the jest 'setupFilesAfterEnv' setup file
// It's a good place to set globals, add global before/after hooks, etc
import { setConfig } from "blitz";
export {}; // so TS doesn't complain
import { config } from "../blitz.config";
setConfig({
serverRuntimeConfig: config.serverRuntimeConfig,
publicRuntimeConfig: config.publicRuntimeConfig,
});
jest.mock("../integrations/logger", () => ({
child: jest.fn().mockReturnValue({
log: jest.fn(),
error: jest.fn(),
debug: jest.fn(),
warn: jest.fn(),
}),
}));