diff --git a/test/license.js b/test/license.js new file mode 100644 index 0000000..27a9d5d --- /dev/null +++ b/test/license.js @@ -0,0 +1,18 @@ +'use strict'; + +/** + * Dependencies + */ +const fs = require("fs"); +const assert = require('assert'); + +/** + * Tests + */ +describe('LICENSE', () => { + it('should contain the current year as the end year of the license', () => { + const license = fs.readFileSync(`${process.cwd()}/LICENSE.txt`, 'utf8'); + const currentYear= (new Date()).getFullYear(); + return assert(license.indexOf(`-${currentYear}`) !== -1); + }); +});