All files / models Courses.js

20% Statements 1/5
100% Branches 0/0
0% Functions 0/3
25% Lines 1/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14      19x                    
import { toArray } from '../boilerplate';
 
// I'm not sure what we wanted from here so take it all.
const formatCourse = course => (
  { ...course }
);
 
export default class Courses {
  constructor(obj) {
    const courseData = obj.ssrGetCoursesResp.courseSearchResult.subjects.subject.courseSummaries;
    this.courses = toArray(courseData).map(course => formatCourse(course));
  }
}