LearnersGuild/echo

View on GitHub
src/test/helpers/fixtures.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function buildSurvey has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  buildSurvey() {
    beforeEach(function () {
      this.buildSurvey = async function (surveyAttrs = {}) {
        const descriptor = surveyAttrs.descriptor || RETROSPECTIVE_DESCRIPTOR
        const cycleState = surveyAttrs.descriptor === WORK_PLAN_DESCRIPTOR ? GOAL_SELECTION : REFLECTION
Severity: Minor
Found in src/test/helpers/fixtures.js - About 1 hr to fix

    Function buildSurvey has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          this.buildSurvey = async function (surveyAttrs = {}) {
            const descriptor = surveyAttrs.descriptor || RETROSPECTIVE_DESCRIPTOR
            const cycleState = surveyAttrs.descriptor === WORK_PLAN_DESCRIPTOR ? GOAL_SELECTION : REFLECTION
            this.cycle = surveyAttrs.cycle || await factory.create('cycle', {state: cycleState})
            this.cycleId = this.cycle.id
    Severity: Minor
    Found in src/test/helpers/fixtures.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status