|
2 | 2 |
|
3 | 3 | var _ = require('lodash')
|
4 | 4 | var path = require('path')
|
5 |
| -var bin = path.resolve(__dirname, '../../bin/nyc') |
6 |
| -var fixturesCLI = path.resolve(__dirname, '../fixtures/cli') |
| 5 | +var bin = path.resolve(__dirname, '../bin/nyc') |
| 6 | +var fixturesCLI = path.resolve(__dirname, './fixtures/cli') |
7 | 7 | var fakebin = path.resolve(fixturesCLI, 'fakebin')
|
8 |
| -var fixturesHooks = path.resolve(__dirname, '../fixtures/hooks') |
| 8 | +var fixturesHooks = path.resolve(__dirname, './fixtures/hooks') |
9 | 9 | var fs = require('fs')
|
10 | 10 | var glob = require('glob')
|
11 | 11 | var isWindows = require('is-windows')()
|
@@ -689,6 +689,24 @@ describe('the nyc cli', function () {
|
689 | 689 | })
|
690 | 690 | })
|
691 | 691 |
|
| 692 | + // see: https://github.com/istanbuljs/nyc/issues/563 |
| 693 | + it('does not create .cache folder if cache is "false"', function (done) { |
| 694 | + var args = [bin, '--cache=false', process.execPath, './index.js'] |
| 695 | + |
| 696 | + var proc = spawn(process.execPath, args, { |
| 697 | + cwd: process.cwd(), |
| 698 | + env: env |
| 699 | + }) |
| 700 | + |
| 701 | + rimraf.sync('./node_modules/.cache') |
| 702 | + |
| 703 | + proc.on('close', function (code) { |
| 704 | + code.should.equal(0) |
| 705 | + fs.existsSync('./node_modules/.cache').should.equal(false) |
| 706 | + done() |
| 707 | + }) |
| 708 | + }) |
| 709 | + |
692 | 710 | it('allows alternative high and low watermarks to be configured', function (done) {
|
693 | 711 | var args = [
|
694 | 712 | bin,
|
|
0 commit comments