janders223/serverless_testing_library

View on GitHub

Showing 3 of 34 total issues

Function configureServer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Confirmed

const configureServer = config => {
  const serverless = yaml.safeLoad(config)

  const server = express()

Severity: Minor
Found in src/app.js - About 1 hr to fix

Function foo has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const foo = Object.entries(serverless.functions).forEach(([name, fn]) => {
    const event = fn.events.filter(e => {
      return Object.keys(e).includes('http')
    })[0].http

Severity: Minor
Found in src/app.js - About 1 hr to fix

Function toHaveHeader has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const toHaveHeader = (response, ...header) => {
  if (header.length === 1) {
    return {
      message: () =>
        matcherHint('.toHaveHeader', 'received', 'expected', {}) +
Severity: Minor
Found in jest/matchers.js - About 1 hr to fix
Severity
Category
Status
Source
Language