mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-08 23:25:51 +01:00
test: use node v6 compatible fs api
This commit is contained in:
parent
95686be47d
commit
35f0b539d9
@ -98,9 +98,10 @@ describe('StorageTest', () => {
|
||||
|
||||
test('should not touch if the package exists and has no uplinks', async (done) => {
|
||||
const storage: IStorageHandler = await generateStorage();
|
||||
const metadataSource = path.join(__dirname, '../partials/metadata')
|
||||
const metadataPath = path.join(storagePath, 'npm_test/package.json')
|
||||
fs.mkdirSync(path.join(storagePath, 'npm_test'))
|
||||
fs.copyFileSync(path.join(__dirname, '../partials/metadata'), metadataPath)
|
||||
fs.writeFileSync(metadataPath, fs.readFileSync(metadataSource));
|
||||
const metadata = JSON.parse(fs.readFileSync(metadataPath).toString())
|
||||
const prevStat = fs.statSync(metadataPath)
|
||||
storage._syncUplinksMetadata('npm_test', metadata, {}, (err) => {
|
||||
|
Loading…
Reference in New Issue
Block a user