Skip to content

Commit

Permalink
Test for #1769
Browse files Browse the repository at this point in the history
  • Loading branch information
Eran Hammer committed Jul 14, 2014
1 parent eacd8f6 commit 6256117
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions test/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ describe('Pack', function () {
};

expect(function () {

pack.register(plugin);
}).to.throw('A callback function is required to register a plugin');
done();
Expand Down Expand Up @@ -566,7 +566,7 @@ describe('Pack', function () {

it('ignores the type of the plugin value', function (done) {

var a = function () {};
var a = function () { };
a.register = function (plugin, options, next) {

plugin.route({ method: 'GET', path: '/', handler: function (request, reply) { reply('ok'); } });
Expand Down Expand Up @@ -2082,5 +2082,22 @@ describe('Pack', function () {
});
});
});

it('composes pack with inner deps', function (done) {

var manifest = {
servers: [{}],
plugins: {
'../test/pack/--deps1': null,
'../test/pack/--deps2': null
}
};

Hapi.Pack.compose(manifest, function (err, pack) {

expect(err).to.not.exist;
done();
});
});
});
});

0 comments on commit 6256117

Please sign in to comment.