promise-rat-race
Advanced tools
Comparing version 1.4.0 to 1.5.1
@@ -1,29 +0,1 @@ | ||
{ | ||
"name": "promise-rat-race", | ||
"version": "1.4.0", | ||
"description": "like Promise.race, but doesn't care about the losers in the race", | ||
"main": "rat-race.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Financial-Times/promise-rat-race.git" | ||
}, | ||
"keywords": [ | ||
"promise", | ||
"race" | ||
], | ||
"author": [ | ||
"Rhys Evans <wheresrhys@gmail.com>", | ||
"Matt Andrews <matt@mattandre.ws>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/Financial-Times/promise-rat-race/issues" | ||
}, | ||
"homepage": "https://github.com/Financial-Times/promise-rat-race#readme", | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"eslint": "^2.2.0", | ||
"lintspaces-cli": "^0.1.1", | ||
"mocha": "^2.5.3" | ||
} | ||
} | ||
{"name":"promise-rat-race","version":"1.5.1","description":"like Promise.race, but doesn't care about the losers in the race","main":"rat-race.js","repository":{"type":"git","url":"git+https://github.com/Financial-Times/promise-rat-race.git"},"keywords":["promise","race"],"author":["Rhys Evans <wheresrhys@gmail.com>","Matt Andrews <matt@mattandre.ws>"],"license":"MIT","bugs":{"url":"https://github.com/Financial-Times/promise-rat-race/issues"},"homepage":"https://github.com/Financial-Times/promise-rat-race#readme","devDependencies":{"chai":"^3.5.0","eslint":"^2.2.0","lintspaces-cli":"^0.1.1","mocha":"^2.5.3","npm-prepublish":"^1.2.2"}} |
10
test.js
@@ -0,1 +1,2 @@ | ||
'use strict'; | ||
const expect = require('chai').expect; | ||
@@ -79,8 +80,8 @@ const ratRace = require('./rat-race'); | ||
it('should hang when any promise hangs', () => { | ||
const resolved = false; | ||
it('should hang when any promise hangs', done => { | ||
let resolved = false; | ||
const hanging = new Promise(() => null); | ||
return ratRace([ | ||
ratRace([ | ||
hanging, | ||
delay(30, 3), | ||
delay(30, 3, true), | ||
delay(10, 1, true), | ||
@@ -95,2 +96,3 @@ delay(40, 4, true) | ||
expect(resolved).to.be.false; | ||
done() | ||
}, 300) | ||
@@ -97,0 +99,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
14484
10
160
5