diff options
| author | Gerard Escalante <[email protected]> | 2014-02-11 11:10:34 +0900 |
|---|---|---|
| committer | Gerard Escalante <[email protected]> | 2014-02-11 11:10:34 +0900 |
| commit | ab1c7aeda0359fb174e4dbfdb7e117cc029eb329 (patch) | |
| tree | fc7a02bb26f448233c9626704d499cca30c6d327 /test | |
| parent | 7f7dad83d26e0d3c3326c260926acfcb6e05fa58 (diff) | |
| download | node-coveralls-ab1c7aeda0359fb174e4dbfdb7e117cc029eb329.tar.xz node-coveralls-ab1c7aeda0359fb174e4dbfdb7e117cc029eb329.zip | |
Windows compat fixes
Changed usage of '/' as root dir. Stopped tests from wiping out
environment.
Diffstat (limited to 'test')
| -rw-r--r-- | test/fetchGitData.js | 3 | ||||
| -rw-r--r-- | test/getOptions.js | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/test/fetchGitData.js b/test/fetchGitData.js index 9c00828..3b8b0fe 100644 --- a/test/fetchGitData.js +++ b/test/fetchGitData.js @@ -3,9 +3,6 @@ var fetchGitData = require('../lib/fetchGitData'); var getOptions = require('../index').getOptions; describe("fetchGitData", function(){ - beforeEach(function(){ - process.env = {}; - }); it("should throw an error when no data is passed", function() { fetchGitData.should.throw(/fetchGitData requires a callback/); }); diff --git a/test/getOptions.js b/test/getOptions.js index f9b2494..9e844ec 100644 --- a/test/getOptions.js +++ b/test/getOptions.js @@ -301,7 +301,7 @@ function ensureLocalGitContext(options) { var fs = require('fs'); var baseDir = process.cwd(), dir = baseDir, gitDir; - while ('/' !== dir) { + while (path.resolve('/') !== dir) { gitDir = path.join(dir, '.git'); var existsSync = fs.existsSync || path.existsSync; if (existsSync(path.join(gitDir, 'HEAD'))) @@ -311,7 +311,7 @@ function ensureLocalGitContext(options) { } options = options || {}; - var synthetic = '/' === dir; + var synthetic = path.resolve('/') === dir; var gitHead, content, branch, id, wrapUp = function() {}; if (synthetic) { |
