Improve code quality and write tests

This commit is contained in:
Shivam Mathur
2019-09-20 21:54:46 +05:30
parent db44db4b97
commit 43178a7254
3597 changed files with 255478 additions and 785554 deletions
+17
View File
@@ -0,0 +1,17 @@
var detect = require('../lib/detect')
var git = require('../lib/git')
describe('Codecov', function() {
it('can detect existing appveyor service', function() {
process.env.TRAVIS = 'true'
expect(detect().service).toBe('travis')
process.env.TRAVIS = ''
})
it('can select local git service if no service is found', function() {
expect(detect().commit).toMatch(/^\w{40}$/)
expect(detect().commit).toBe(git.head())
})
})