Skip to content

Commit 3f60842

Browse files
committed
test: test function getConfigFromRemote
1 parent b7d0529 commit 3f60842

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

lib/src/_utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ module.exports = {
363363
dashToCamelCase,
364364
formatDate,
365365
getConfigFromFile,
366+
getConfigFromRemote,
366367
getGrenConfig,
367368
getFileExtension,
368369
getFileNameFromPath,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@femessage/github-release-notes",
3-
"version": "0.1.0",
3+
"version": "0.17.0",
44
"description": "Create a release from a tag and uses issues or commits to creating the release notes. It also can generate a CHANGELOG.md file based on the release notes (or generate a brand new).",
55
"main": "./github-release-notes.js",
66
"scripts": {

test/_utils.spec.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ describe('_utils.js', () => {
174174
});
175175
});
176176

177+
describe('getConfigFromRemote', () => {
178+
const grenRemote = 'https://raw.githubusercontent.com/FEMessage/github-release-notes/master/.grenrc.js';
179+
const grenrc = require(process.cwd() + '/.grenrc.js');
180+
181+
it('Should fetch config from remote url', () => {
182+
assert.deepEqual(utils.getConfigFromRemote(grenRemote), grenrc, 'Given a remote gren config');
183+
});
184+
});
185+
177186
describe('getFileExtension', () => {
178187
it('Should return the extension of the file', () => {
179188
assert.deepEqual(utils.getFileExtension('filename.txt'), 'txt', 'Just the filename');

0 commit comments

Comments
 (0)