diff options
Diffstat (limited to 'test/plugins.js')
-rw-r--r-- | test/plugins.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/plugins.js b/test/plugins.js new file mode 100644 index 0000000..123a194 --- /dev/null +++ b/test/plugins.js @@ -0,0 +1,37 @@ +var mock = require('./mock'); +var registry = require('../lib/plugins/registry'); + +describe('Plugins', function() { + var book; + + before(function() { + return mock.setupBook({}) + .then(function(_book) { + book = _book; + }); + }); + + describe('Resolve Version', function() { + + it('should resolve a plugin version', function() { + return registry.resolve('ga') + .should.be.fulfilled(); + }); + + }); + + describe('Installation', function() { + + it('should install a plugin from NPM without a specific version', function() { + return registry.install(book, 'ga') + .should.be.fulfilled(); + }); + + it('should install a plugin from NPM with a specific version', function() { + return registry.install(book, 'ga', '1.0.0') + .should.be.fulfilled(); + }); + + }); +}); + |