From f6c3a3d0e2f0fd8027a5a647e641ba89645d480a Mon Sep 17 00:00:00 2001 From: Yuta Shimizu Date: Thu, 17 Sep 2020 22:21:27 +0900 Subject: [PATCH 1/2] Fix failing specs --- test/Gren.spec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Gren.spec.js b/test/Gren.spec.js index b268b412..f4143f99 100644 --- a/test/Gren.spec.js +++ b/test/Gren.spec.js @@ -544,9 +544,10 @@ describe('Gren', () => { const receivedObject = gren._transformTagsIntoReleaseObjects([tag]); - assert.equals(tag.date, receivedObject.date); - assert.equals(tag.releaseId, receivedObject.id); - assert.equals(tag.name, receivedObject.name); + assert.equal(1, receivedObject.length) + assert.equal(tag.date, receivedObject[0].date); + assert.equal(tag.releaseId, receivedObject[0].id); + assert.equal(tag.tag.name, receivedObject[0].name); }); }); From b01d31cdad6e9e47f51e746ceee0fbac7cf7dab8 Mon Sep 17 00:00:00 2001 From: Yuta Shimizu Date: Thu, 17 Sep 2020 23:10:22 +0900 Subject: [PATCH 2/2] Fix tests that require network Target tags should be listed in the first 10. `gren.options.dataSource` seems required in `_getReleaseBlocks()` --- test/Gren.spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Gren.spec.js b/test/Gren.spec.js index f4143f99..94a2bc04 100644 --- a/test/Gren.spec.js +++ b/test/Gren.spec.js @@ -610,11 +610,11 @@ describe('Gren', () => { describe('with tags=all', () => { describe('with ignoreTagsWith', () => { it('should ignore the specific tag', done => { - gren.options.ignoreTagsWith = ['11']; + gren.options.ignoreTagsWith = ['16']; gren.options.tags = ['all']; gren._getLastTags() .then(tags => { - assert.notInclude(tags.map(({ name }) => name), '0.11.0', 'The ignored tag is not present'); + assert.notInclude(tags.map(({ name }) => name), '0.16.0', 'The ignored tag is not present'); done(); }) .catch(err => done(err)); @@ -625,7 +625,8 @@ describe('Gren', () => { describe('_getReleaseBlocks', () => { it('more than one tag', done => { - gren.options.tags = ['0.12.0', '0.11.0']; + gren.options.tags = ['0.17.2', '0.17.1']; + gren.options.dataSource = "commits"; gren._getReleaseBlocks() .then(releaseBlocks => { assert.isArray(releaseBlocks, 'The releaseBlocks is an Array'); @@ -638,7 +639,8 @@ describe('Gren', () => { }).timeout(10000); it('just one tag', done => { - gren.options.tags = ['0.11.0']; + gren.options.tags = ['0.17.2']; + gren.options.dataSource = "commits"; gren._getReleaseBlocks() .then(releaseBlocks => { assert.isArray(releaseBlocks, 'The releaseBlocks is an Array');