Skip to content

Commit

Permalink
avoid out of memory
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Oct 28, 2022
1 parent 9024602 commit 10817c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/__tests__/modules/extensionAll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import os from 'os'
import { URL } from 'url'
import { DependencySession } from '../../extension/dependency'
import fetch from '../../model/fetch'
import { waitImmediate } from '../../util'

process.env.NO_PROXY = '*'

Expand All @@ -25,9 +26,10 @@ describe('Test dependencies ', () => {
// optionalDependencies
console.log(`total: ${names.length}`)
let registry = new URL('https://registry.npmjs.org/')
let session = new DependencySession(registry, os.tmpdir())

for (let name of names) {
await waitImmediate()
let session = new DependencySession(registry, os.tmpdir())
console.log(`Checking module ${name}`)
try {
let dep = session.createInstaller(os.tmpdir(), () => {})
Expand Down

0 comments on commit 10817c0

Please sign in to comment.