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

chimurai / http-proxy-middleware / 16033666232

02 Jul 2025 07:08PM UTC coverage: 97.129%. Remained the same
16033666232

Pull #1126

github

chimurai
test(websocket): fix ws import
Pull Request #1126: test(websocket): fix ws import

168 of 181 branches covered (92.82%)

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