Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added tests for "complete" event

  • Loading branch information...
commit 13c288d00a3b10daa687f536e6c6038f665e075b 1 parent 54b0b79
@tj authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/test.migrate.js
View
7 test/test.migrate.js
@@ -121,6 +121,7 @@ function testMigrationEvents() {
});
var migrations = []
+ , completed = 0
, expectedMigrations = [
'add guy ferrets'
, 'add girl ferrets'
@@ -133,13 +134,19 @@ function testMigrationEvents() {
direction.should.be.a('string');
});
+ set.on('complete', function(){
+ ++completed;
+ });
+
set.up(function(){
db.pets[0].email.should.equal('tobi@lb.com');
migrations.should.eql(expectedMigrations);
+ completed.should.equal(1);
migrations = [];
set.down(function(){
migrations.should.eql(expectedMigrations.reverse());
+ completed.should.equal(2);
assertNoPets();
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.