Socket
Socket
Sign inDemoInstall

fastq

Package Overview
Dependencies
1
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.14.0 to 1.15.0

2

package.json
{
"name": "fastq",
"version": "1.14.0",
"version": "1.15.0",
"description": "Fast, in memory work queue",

@@ -5,0 +5,0 @@ "main": "queue.js",

@@ -269,2 +269,8 @@ 'use strict'

function drained () {
if (queue.idle()) {
return new Promise(function (resolve) {
resolve()
})
}
var previousDrain = queue.drain

@@ -271,0 +277,0 @@

@@ -132,2 +132,29 @@ 'use strict'

test('drained while idle should resolve', async function (t) {
const queue = buildQueue(worker, 2)
async function worker (arg) {
await sleep(arg)
}
await queue.drained()
})
test('drained while idle should not call the drain function', async function (t) {
let drainCalled = false
const queue = buildQueue(worker, 2)
queue.drain = function () {
drainCalled = true
}
async function worker (arg) {
await sleep(arg)
}
await queue.drained()
t.equal(drainCalled, false)
})
test('set this', async function (t) {

@@ -134,0 +161,0 @@ t.plan(1)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc