mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Port the unit tests from https://github.com/vercel/nft/tree/941be1cb3b9d38fbc99a8a6f07af568a64ed0f12/test/unit
19 lines
463 B
JavaScript
19 lines
463 B
JavaScript
const npm = require('npm')
|
|
const install = require('npm/lib/install')
|
|
const rimraf = require('rimraf')
|
|
|
|
npm.load((err) => {
|
|
if (err) {
|
|
throw err
|
|
}
|
|
npm.config.set('audit', false)
|
|
npm.config.set('package-lock', false)
|
|
npm.config.set('progress', false)
|
|
if (process.env.NPM_REGISTRY_URL) {
|
|
npm.config.set('registry', process.env.NPM_REGISTRY_URL)
|
|
}
|
|
const args = [`[email protected]`]
|
|
install('./asdf', args, () => {})
|
|
rimraf.sync('./asdf')
|
|
})
|