summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/plugins/__tests__/resolveVersion.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/plugins/__tests__/resolveVersion.js b/lib/plugins/__tests__/resolveVersion.js
index 164611f..1877c9e 100644
--- a/lib/plugins/__tests__/resolveVersion.js
+++ b/lib/plugins/__tests__/resolveVersion.js
@@ -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');
});
});
});