���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /proc/self/root/home/real/node-v13.0.1/deps/npm/test/tap/ |
var fs = require('graceful-fs') var path = require('path') var mkdirp = require('mkdirp') var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') var pkg = common.pkg test('npm shrinkwrap execution order', function (t) { setup() fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({ author: 'Simen Bekkhus', name: 'shrinkwrap-lifecycle', shrinkwrap: '0.0.0', description: 'Test for npm shrinkwrap execution order', scripts: { preshrinkwrap: 'echo this happens first', shrinkwrap: 'echo this happens second', postshrinkwrap: 'echo this happens third' } }), 'utf8') common.npm(['shrinkwrap', '--loglevel=error'], [], function (err, code, stdout, stderr) { if (err) throw err t.comment(stdout) t.comment(stderr) var indexOfFirst = stdout.indexOf('echo this happens first') var indexOfSecond = stdout.indexOf('echo this happens second') var indexOfThird = stdout.indexOf('echo this happens third') t.ok(indexOfFirst >= 0) t.ok(indexOfSecond >= 0) t.ok(indexOfThird >= 0) t.ok(indexOfFirst < indexOfSecond) t.ok(indexOfSecond < indexOfThird) t.end() }) }) test('cleanup', function (t) { process.chdir(osenv.tmpdir()) rimraf.sync(pkg) t.end() }) function setup () { mkdirp.sync(pkg) process.chdir(pkg) }