Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Pipe - cleaned up and merged with master #92

Merged
merged 17 commits into from
Apr 2, 2019
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'master' into pipe
  • Loading branch information
dotnetCarpenter committed Mar 13, 2018
commit b145b19d94c9feaa641644164fa760e5e4344e95
15 changes: 10 additions & 5 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ describe("Codecov", function(){

it("can auto detect reports", function(){
var res = codecov.upload({options: {dump: true}});
expect(res.files[0].split(pathSeparator).pop()).to.eql('example.coverage.txt');
expect(res.files[0].split(pathSeparator).pop()).to.eql('coverage.json');
expect(res.body).to.contain('this file is intentionally left blank');
});

it("can specify report in cli", function(){
var res = codecov.upload({options: {dump: true, file: 'test' + pathSeparator + 'example.coverage.txt'}});
expect(res.files[0].split(pathSeparator).pop()).to.eql('example.coverage.txt');
var res = codecov.upload({options: {dump: true, file: 'test' + pathSeparator + 'coverage.json'}});
expect(res.files[0].split(pathSeparator).pop()).to.eql('coverage.json');
expect(res.body).to.contain('this file is intentionally left blank');
});

Expand All @@ -57,7 +57,7 @@ describe("Codecov", function(){
it("can detect .bowerrc without directory", function(){
fs.writeFileSync('.bowerrc', '{"key": "value"}');
var res = codecov.upload({options: {dump: true}});
expect(res.files[0].split(pathSeparator).pop()).to.eql('example.coverage.txt');
expect(res.files[0].split(pathSeparator).pop()).to.eql('coverage.json');
expect(res.body).to.contain('this file is intentionally left blank');
});

Expand Down Expand Up @@ -134,12 +134,17 @@ describe("Codecov", function(){

it("can read piped reports", function(done){
var exec = require('child_process').exec;
var childProcess = exec('cat test/example.coverage.txt | bin/codecov --dump --disable=gcov', function(err, stdout, stderr){
var childProcess = exec('cat test/coverage.json | bin/codecov --dump --disable=gcov', function(err, stdout, stderr){
expect(stdout.toString()).to.contain('path=piped');
expect(stdout.toString()).to.contain('this file is intentionally left blank');
childProcess.kill();
done();
});
});

it('should have the correct version number', function() {
var version = require('../package.json').version
expect(codecov.version).to.eql('v' + version)
})

});
You are viewing a condensed version of this merge commit. You can view the full changes here.