Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

chore: Adds test to check license end year. #56

Merged
merged 1 commit into from
Nov 11, 2017
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: 16 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,4 +319,19 @@ describe('nodejs-http-client repo', function() {
throw e;
}
}
});
})

describe('LICENSE', function() {
it('should have correct end year', function(done) {
var licenseFile = fs.readFileSync('LICENSE.md', 'utf8')
var licenseYearRange = licenseFile.split('\n')[2].split(' ')[2]
var endYear = licenseYearRange.split('-')[1]
var thisYear = (new Date()).getFullYear()

if (endYear != thisYear) {
assert.fail(thisYear, endYear, "LICENSE end year is not correct")
} else {
done()
}
})
})