Skip to content

Commit

Permalink
Merge pull request #1541 from simov/fix-coveralls
Browse files Browse the repository at this point in the history
Fix coveralls
  • Loading branch information
simov committed Apr 22, 2015
2 parents 6de11c0 + 5ebab4c commit a11878a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/test-agentOptions.js
@@ -1,5 +1,11 @@
'use strict'

if (process.env.running_under_istanbul) {
// test-agent.js modifies the process state
// causing these tests to fail when running under single process via tape
return
}

var request = require('../index')
, http = require('http')
, server = require('./server')
Expand Down
3 changes: 3 additions & 0 deletions tests/test-har.js
@@ -1,5 +1,6 @@
'use strict'

var path = require('path')
var request = require('..')
var tape = require('tape')
var fixture = require('./fixtures/har.json')
Expand Down Expand Up @@ -107,6 +108,8 @@ tape('multipart-file', function (t) {
url: s.url,
har: fixture['multipart-file']
}
var absolutePath = path.resolve(__dirname, options.har.postData.params[0].fileName)
options.har.postData.params[0].fileName = absolutePath

request(options, function (err, res, body) {
var json = JSON.parse(body)
Expand Down
8 changes: 7 additions & 1 deletion tests/test-https.js
Expand Up @@ -117,4 +117,10 @@ function runAllTests(strict, s) {
}

runAllTests(false, s)
runAllTests(true, sStrict)

if (!process.env.running_under_istanbul) {
// somehow this test modifies the process state
// test coverage runs all tests in a single process via tape
// executing this test causes one of the tests in test-tunnel.js to throw
runAllTests(true, sStrict)
}

0 comments on commit a11878a

Please sign in to comment.