Last active
December 19, 2015 23:18
-
-
Save fnakstad/6033342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| beforeEach(function(done) { | |
| // ... | |
| // Reset collections | |
| User.remove().exec() | |
| .then(function() { return Exercise.remove().exec() }) | |
| .then(function() { return WorkoutTemplate.remove().exec() }) | |
| // Seed | |
| .then(function() { return User.seed(require('../scaffolds/users.json')) }) | |
| .then(function() { returnExercise.seed(require('../scaffolds/exercises.json')); }) | |
| .then(function() { return WorkoutTemplate.seed(require('../scaffolds/workoutTemplates.json')); }) | |
| // Finito! | |
| .then(function() { done(); }, function(err) { return done(err); }); | |
| // ... | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment