MCPcopy
hub / github.com/nestjs/nest / performHttpCallAsync

Function performHttpCallAsync

integration/scopes/e2e/durable-providers.spec.ts:46–56  ·  view source on GitHub ↗
(
      tenantId: number,
      endpoint = '/durable',
      opts: {
        forceError: boolean;
      } = { forceError: false },
    )

Source from the content-addressed store, hash-verified

44 });
45
46 const performHttpCallAsync = (
47 tenantId: number,
48 endpoint = '/durable',
49 opts: {
50 forceError: boolean;
51 } = { forceError: false },
52 ) =>
53 request(baseUrl)
54 .get(endpoint)
55 .set({ ['x-tenant-id']: String(tenantId) })
56 .set({ ['x-force-error']: opts.forceError ? 'true' : 'false' });
57
58 it(`should share durable providers per tenant`, async () => {
59 let result: request.Response;

Callers 1

Calls 2

setMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected