Testing for API in NextJS
import { createMocks, RequestMethod } from 'node-mocks-http';
import type { NextApiRequest, NextApiResponse } from 'next';
import apiGetEnv from '../pages/api/get-env';
describe("test api", () => {
function mockRequestResponse(method: RequestMet...
tech.finlup.id1 min read