Sha256: 97eafdfce90d14614adab53ad5a2e0aaa69dbe493edd051d24760f3295056b43
Contents?: true
Size: 942 Bytes
Versions: 5
Compression:
Stored size: 942 Bytes
Contents
'use strict' var fs = require('graceful-fs') var path = require('path') var mkdirpSync = require('mkdirp').sync var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') var base = path.join(__dirname, path.basename(__filename, '.js')) var cruft = path.join(base, 'node_modules', 'cruuuft') var pkg = { name: 'example', version: '1.0.0', dependencies: {} } function setup () { mkdirpSync(path.dirname(cruft)) fs.writeFileSync(cruft, 'this is some cruft for sure') fs.writeFileSync(path.join(base, 'package.json'), JSON.stringify(pkg)) } function cleanup () { rimraf.sync(base) } test('setup', function (t) { cleanup() setup() t.done() }) test('cruft', function (t) { common.npm(['ls'], {cwd: base}, function (er, code, stdout, stderr) { t.is(stderr, '', 'no warnings or errors from ls') t.done() }) }) test('cleanup', function (t) { cleanup() t.done() })
Version data entries
5 entries across 4 versions & 1 rubygems