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

chimurai / http-proxy-middleware / 4156994027

pending completion
4156994027

Pull #875

github

GitHub
Merge 21de28a41 into 5a5da0d01
Pull Request #875: docs(README): fix badge links

158 of 162 branches covered (97.53%)

368 of 376 relevant lines covered (97.87%)

23.29 hits per line

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

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

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

13
  const defaultPlugins: Plugin[] = !!options.ejectPlugins
70✔
14
    ? [] // no default plugins when ejecting
15
    : [debugProxyErrorsPlugin, proxyEventsPlugin, loggerPlugin, ...maybeErrorResponsePlugin];
16
  const userPlugins: Plugin[] = options.plugins ?? [];
70✔
17
  return [...defaultPlugins, ...userPlugins];
70✔
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