()
| 500 | } |
| 501 | |
| 502 | getSolutions () { |
| 503 | const plan = this.getProgrammablePlan() |
| 504 | const solutions = _.cloneDeep(plan?.solutions || []) |
| 505 | const context = this.getCodeContext(plan) |
| 506 | |
| 507 | return _.map(solutions, solution => { |
| 508 | try { |
| 509 | return { |
| 510 | ...solution, |
| 511 | source: _.template(solution.source)(context), |
| 512 | } |
| 513 | } catch (e) { |
| 514 | console.error(`Problem with template and solution comments for '${this.get('slug') || this.get('name')}'`, e) |
| 515 | return solution |
| 516 | } |
| 517 | }) |
| 518 | } |
| 519 | |
| 520 | getSampleCode (team = 'humans') { |
| 521 | const plan = this.getProgrammablePlan(team) |
no test coverage detected