mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 10:03:31 +00:00
Add test for plugin version resolution
This commit is contained in:
@@ -2,13 +2,21 @@ var PluginDependency = require('../../models/pluginDependency');
|
||||
var resolveVersion = require('../resolveVersion');
|
||||
|
||||
describe('resolveVersion', function() {
|
||||
it('must skip resolving and return non-semver versions', function(done) {
|
||||
var plugin = PluginDependency.createFromString('plugin-ga@git+ssh://samy@github.com/GitbookIO/plugin-ga.git');
|
||||
it('must skip resolving and return non-semver versions', function() {
|
||||
var plugin = PluginDependency.createFromString('ga@git+ssh://samy@github.com/GitbookIO/plugin-ga.git');
|
||||
|
||||
resolveVersion(plugin)
|
||||
return resolveVersion(plugin)
|
||||
.then(function(version) {
|
||||
expect(version).toBe('git+ssh://samy@github.com/GitbookIO/plugin-ga.git');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('must resolve a normal plugin dependency', function() {
|
||||
var plugin = PluginDependency.createFromString('ga@>0.9.0 < 1.0.1');
|
||||
|
||||
return resolveVersion(plugin)
|
||||
.then(function(version) {
|
||||
expect(version).toBe('1.0.0');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user