jameswlane/jest-express

View on GitHub
src/router.ts

Summary

Maintainability
A
1 hr
Test Coverage
A
100%

Function constructor has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  constructor() {
    const handler = (path: any, ...callbacks: any): void => {
      const flattened = [].concat(...callbacks); // flatten array
      if (typeof path === 'string' && flattened.every((cb: any) => typeof cb === 'function')) {
        flattened.forEach((cb: any) => cb(this.request, this.response, this.next));
Severity: Minor
Found in src/router.ts - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status