• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

chimurai / http-proxy-middleware / 15088261553

17 May 2025 07:12PM UTC coverage: 97.129%. Remained the same
15088261553

Pull #1118

github

web-flow
Merge 51f382610 into 573cf6587
Pull Request #1118: chore(package): bump dev dependencies

137 of 143 branches covered (95.8%)

406 of 418 relevant lines covered (97.13%)

24.65 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/get-plugins.ts
1
import {
12✔
2
  debugProxyErrorsPlugin,
3
  errorResponsePlugin,
4
  loggerPlugin,
5
  proxyEventsPlugin,
6
} from './plugins/default';
7
import type { Options, Plugin } from './types';
8

9
export function getPlugins<TReq, TRes>(options: Options<TReq, TRes>): Plugin<TReq, TRes>[] {
12✔
10
  // don't load default errorResponsePlugin if user has specified their own
11
  const maybeErrorResponsePlugin = options.on?.error ? [] : [errorResponsePlugin];
81✔
12

13
  const defaultPlugins = options.ejectPlugins
81✔
14
    ? [] // no default plugins when ejecting
15
    : [debugProxyErrorsPlugin, proxyEventsPlugin, loggerPlugin, ...maybeErrorResponsePlugin];
16
  const userPlugins: Plugin<TReq, TRes>[] = options.plugins ?? [];
81✔
17
  return [...defaultPlugins, ...userPlugins] as unknown as Plugin<TReq, TRes>[];
81✔
18
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc