1 var fs = require('graceful-fs')
2 var path = require('path')
4 var mkdirp = require('mkdirp')
5 var rimraf = require('rimraf')
6 var test = require('tap').test
8 var common = require('../common-tap')
10 var pkg = path.resolve(__dirname, 'run-script-filter-private')
12 var opts = { cwd: pkg }
15 name: 'run-script-filter-private',
19 var npmrc = '//blah.com:_harsh=realms\n'
21 test('setup', function (t) {
25 path.resolve(pkg, 'package.json'),
26 JSON.stringify(json, null, 2) + '\n'
29 path.resolve(pkg, '.npmrc'),
35 test('npm run-script env', function (t) {
36 common.npm(['run-script', 'env'], opts, function (er, code, stdout, stderr) {
37 t.ifError(er, 'using default env script')
38 t.notOk(stderr, 'should not generate errors')
39 t.ok(stdout.indexOf('npm_config_init_version') > 0, 'expected values in var list')
40 t.notMatch(stdout, /harsh/, 'unexpected config not there')
45 test('cleanup', function (t) {