Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit a294d59

Browse files
author
Axel Rindle
committed
Updated tests.
1 parent 1127122 commit a294d59

2 files changed

Lines changed: 59 additions & 59 deletions

File tree

test/test-promise-handling.js

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
#!/usr/bin/env node
2-
'use strict';
3-
4-
// register coffee-script
5-
require('coffee-script/register');
6-
7-
// require modules
8-
const versionCheck = require('../lib/main.coffee');
9-
const assert = require('assert');
10-
11-
const options = {
12-
repo: 'axelrindle/github-version-checker',
13-
currentVersion: "1.0.0"
14-
};
15-
16-
describe('github-version-checker', function () {
17-
describe('#versionCheck with one parameter and correct options', function () {
18-
it('should resolve the Promise without errors', function () {
19-
versionCheck(options).then(
20-
function (update) {
21-
assert.notEqual(update, undefined);
22-
},
23-
function (error) {
24-
throw error;
25-
}
26-
);
27-
});
28-
});
29-
});
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
// register coffee-script
5+
require('coffeescript/register');
6+
7+
// require modules
8+
const versionCheck = require('../lib/main.coffee');
9+
const assert = require('assert');
10+
11+
const options = {
12+
repo: 'axelrindle/github-version-checker',
13+
currentVersion: require('../package.json').version
14+
};
15+
16+
describe('github-version-checker', function () {
17+
describe('#versionCheck with one parameter and correct options', function () {
18+
it('should resolve the Promise without errors', function () {
19+
versionCheck(options).then(
20+
function (update) {
21+
assert.notEqual(update, undefined);
22+
},
23+
function (error) {
24+
throw error;
25+
}
26+
);
27+
});
28+
});
29+
});

test/test-return-types.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
1-
#!/usr/bin/env node
2-
'use strict';
3-
4-
// register coffee-script
5-
require('coffee-script/register');
6-
7-
// require modules
8-
const versionCheck = require('../lib/main.coffee');
9-
const assert = require('assert');
10-
11-
const options = {
12-
repo: 'axelrindle/github-version-checker',
13-
currentVersion: "1.0.0"
14-
};
15-
16-
describe('github-version-checker', function () {
17-
describe('#versionCheck with two parameters', function () {
18-
it('should return null', function () {
19-
assert.equal(versionCheck(options, function(update, error) {}), null);
20-
});
21-
});
22-
});
23-
24-
describe('github-version-checker', function () {
25-
describe('#versionCheck with only one options parameter', function () {
26-
it('should return a Promise', function () {
27-
assert.equal(typeof versionCheck(options).then, 'function');
28-
});
29-
});
30-
});
1+
#!/usr/bin/env node
2+
'use strict'
3+
4+
// register coffeescript
5+
require('coffeescript/register')
6+
7+
// require modules
8+
const versionCheck = require('../lib/main')
9+
const assert = require('assert')
10+
11+
const options = {
12+
repo: 'axelrindle/github-version-checker',
13+
currentVersion: require('../package.json').version
14+
}
15+
16+
describe('github-version-checker', function () {
17+
describe('#versionCheck with two parameters', function () {
18+
it('should return null', function () {
19+
assert.equal(versionCheck(options, function(update, error) {}), null)
20+
})
21+
})
22+
})
23+
24+
describe('github-version-checker', function () {
25+
describe('#versionCheck with only one options parameter', function () {
26+
it('should return a Promise', function () {
27+
assert.equal(typeof versionCheck(options).then, 'function')
28+
})
29+
})
30+
})

0 commit comments

Comments
 (0)