message: import files
diff: @@ -14,6 +14,8 @@ export class FixtureLoader {
  private usersDirectory = 'build/fixtures/users/';
  private coursesDirectory = 'build/fixtures/courses/';
  + private binaryDirectory = 'build/fixtures/binaryData/';
  +
  constructor() {
  (<any>mongoose).Promise = global.Promise;
  @@ -57,6 +59,19 @@ export class FixtureLoader {
  return importedCourse._id;
  }));
  + // import files
  + const fileUnits = await Unit.find({files: {$exists: true}});
  +
  + await Promise.all(fileUnits.map(async unit => {
  + const files = (<any>unit).files;
  +
  + for (const file of files) {
  + if (!fs.existsSync(file.path) && fs.existsSync(this.binaryDirectory + file.alias)) {
  + fs.copyFileSync(this.binaryDirectory + file.alias, file.path)
  + }
  + }
  + }));
  +
  // generate progress
  const progressableUnits = await Unit.find({progressable: true});
  