-
-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(check): fix check via API not passing results to the callback
Signed-off-by: RandomSeeded <nate@blend.com>
- Loading branch information
RandomSeeded
committed
Apr 16, 2018
1 parent
86669d5
commit b743696
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var Code = require('code'); | ||
var Lab = require('lab'); | ||
var lab = (exports.lab = Lab.script()); | ||
var onComplete = require('../lib/commands/on-complete'); | ||
|
||
lab.experiment('on-complete', function () { | ||
lab.test('should invoke the callback with the results', function (done) { | ||
var migratorMock = { | ||
driver: { | ||
close: function (cb) { | ||
cb(); | ||
} | ||
} | ||
}; | ||
var internalsMock = { | ||
argv: { } | ||
}; | ||
|
||
var resultsPassedToCallback = 'callback should be invoked with results'; | ||
var testCallback = function (err, res) { | ||
Code.expect(err).to.equal(null); | ||
Code.expect(res).to.equal(resultsPassedToCallback); | ||
done(); | ||
}; | ||
onComplete(migratorMock, internalsMock, testCallback, null, resultsPassedToCallback); | ||
}); | ||
}); |