Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions test/Gren.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

Expand Down Expand Up @@ -609,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));
Expand All @@ -624,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');
Expand All @@ -637,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');
Expand Down