Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Rindle committed May 2, 2020
1 parent 8584130 commit 17bc1e2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
22 changes: 10 additions & 12 deletions test/test-promise-handling.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@ const options = {
currentVersion: require('../package.json').version
};

describe('github-version-checker', function () {
describe('#versionCheck with one parameter and correct options', function () {
it('should resolve without errors', function (done) {
versionCheck(options)
.then(function (update) {
done();
})
.catch(function (err) {
done(new Error(err));
});
});
describe('#versionCheck with one parameter and correct options', function () {
it('should resolve without errors', function (done) {
versionCheck(options)
.then(function (update) {
done();
})
.catch(function (err) {
done(new Error(err));
});
});
});
});
26 changes: 11 additions & 15 deletions test/test-return-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@ const options = {
currentVersion: require('../package.json').version
};

describe('github-version-checker', function () {
describe('#versionCheck with two parameters', function () {
it('should return null', function (done) {
assert.equal(versionCheck(options, function(update, err) {
if (err) done(new Error(err));
else done();
}), null)
})
})
describe('#versionCheck with two parameters', function () {
it('should return null', function (done) {
assert.equal(versionCheck(options, function(update, err) {
if (err) done(new Error(err));
else done();
}), null);
});
});

describe('github-version-checker', function () {
describe('#versionCheck with only one options parameter', function () {
it('should return a Promise', function () {
assert.equal(typeof versionCheck(options).then, 'function')
})
})
describe('#versionCheck with only one options parameter', function () {
it('should return a Promise', function () {
assert.equal(typeof versionCheck(options).then, 'function');
});
});

0 comments on commit 17bc1e2

Please sign in to comment.