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

chimurai / http-proxy-middleware / 14246826731

03 Apr 2025 03:26PM UTC coverage: 97.33% (+0.05%) from 97.284%
14246826731

Pull #823

github

web-flow
Merge ef93655f0 into e94087e8d
Pull Request #823: fix(websocket): handle errors in handleUpgrade

137 of 142 branches covered (96.48%)

16 of 16 new or added lines in 2 files covered. (100.0%)

401 of 412 relevant lines covered (97.33%)

24.93 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<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