diff --git a/lib/codecov.js b/lib/codecov.js index 2bb4920e..ae6a3d8e 100644 --- a/lib/codecov.js +++ b/lib/codecov.js @@ -6,7 +6,7 @@ var execSync = require('child_process').execSync; var detectProvider = require('./detect'); -var version = "v1.0.1"; +var version = 'v' + require('../package.json').version; var patterns = "-type f \\( -name '*coverage.*' " + "-or -name 'nosetests.xml' " + diff --git a/test/index.js b/test/index.js index 22c8ec84..2996b636 100644 --- a/test/index.js +++ b/test/index.js @@ -126,5 +126,10 @@ describe("Codecov", function(){ expect(res.debug).to.contain('find folder/path -type f -name \'*.gcno\' -not -path \'ignore/this/folder\' -exec llvm-gcov -o {} +'); }); + it('should have the correct version number', function() { + var version = require('../package.json').version + expect(codecov.version).to.eql('v' + version) + }) + });