InCuca/loopback-chai

View on GitHub
src/methods/have-one.js

Summary

Maintainability
C
7 hrs
Test Coverage

Showing 1 of 1 total issue

Similar blocks of code found in 3 locations. Consider refactoring.
Open

export function haveOne(relationship, model, foreignKey) {
expect(this._obj).to.have.relationship(relationship, model);
 
const { settings } = this._obj.definition;
const relObj = settings.relations[relationship];
Severity: Major
Found in src/methods/have-one.js and 2 other locations - About 7 hrs to fix
src/methods/belongs-to.js on lines 3..16
src/methods/have-many.js on lines 3..16
Category
Status