diff --git a/lib/resolve/resolvers/GitResolver.js b/lib/resolve/resolvers/GitResolver.js index b2bd0706..a440651f 100644 --- a/lib/resolve/resolvers/GitResolver.js +++ b/lib/resolve/resolvers/GitResolver.js @@ -72,7 +72,7 @@ GitResolver.prototype._findResolution = function (target) { return this._findResolution('master'); } - // Find the highest one that satifies the target + // Find the highest one that satisfies the target var version = mout.array.find(versions, function (version) { return semver.satisfies(version, target); }, this); diff --git a/test/resolve/resolvers/gitFsResolver.js b/test/resolve/resolvers/gitFsResolver.js index 910bdc50..764918da 100644 --- a/test/resolve/resolvers/gitFsResolver.js +++ b/test/resolve/resolvers/gitFsResolver.js @@ -1,6 +1,6 @@ describe('GitFsResolver', function () { describe('.resolve', function () { - it.skip('should resolve to the latest commit if a repo has no tags'); + it.skip('should resolve to the latest commit if a repository has no tags'); it.skip('should resolve to the specified range'); it.skip('should resolve to the specified version'); it.skip('should resolve to the specified commit'); diff --git a/test/resolve/resolvers/gitResolver.js b/test/resolve/resolvers/gitResolver.js index 462c9170..7f03e9eb 100644 --- a/test/resolve/resolvers/gitResolver.js +++ b/test/resolve/resolvers/gitResolver.js @@ -10,7 +10,38 @@ describe('GitResolver', function () { delete GitResolver._refs; }); + describe('hasNew', function () { + it('should return a promise'); + it('should be true when the resolution type is different'); + it('should be true when a different tag (higher/lower) for a range is available'); + it('should be false when resolved to the same tag for a given range'); + it('should be true when a different commit hash for a given branch is available'); + it('should be false when resolved to the the same commit hash for a given branch'); + it('should be false when targeting commit hashes'); + it('should resolve to the master branch when the target is *'); + }); + + describe('resolve', function () { + it('should return a promise'); + it('should call the necessary functions by thee correct order'); + }); + + describe('._findResolution', function () { + it('should return a promise'); + }); + + describe('._cleanup', function () { + it('should return a promise'); + it('should remove the .git folder from the temp dir'); + }); + + describe('._savePkgMeta', function () { + it('should return a promise'); + it('should save the resolution to the json to be used later by .hasNew'); + }); + describe('#fetchHeads', function () { + it('should return a promise'); it('should resolve to an empty object if no heads are found', function (next) { GitResolver.fetchRefs = function () { return Q.resolve([]); @@ -109,6 +140,7 @@ describe('GitResolver', function () { }); describe('#fetchVersions', function () { + it('should return a promise'); it('should resolve to an empty array if no tags are found', function (next) { GitResolver.fetchRefs = function () { return Q.resolve([]);