expose promise polyfill in a way that won't need code migration later

This commit is contained in:
Leo Horie 2016-11-16 21:15:23 -05:00
parent 62724a1143
commit 439cf95673
7 changed files with 60 additions and 95 deletions

View file

@ -33,46 +33,3 @@ o.spec("scan", function() {
})
})
o.spec("scanMerge", function() {
var scanMerge
o.beforeEach(function() {
scanMerge = require("../scan-merge")
})
o("defaults to seed", function() {
var parent1 = stream()
var parent2 = stream()
var child = scanMerge([
[parent1, function(out, p1) {
return out + p1
}],
[parent2, function(out, p2) {
return out + p2
}]
], -10)
o(child()).equals(-10)
})
o("accumulates as expected", function() {
var parent1 = stream()
var parent2 = stream()
var child = scanMerge([
[parent1, function(out, p1) {
return out + p1
}],
[parent2, function(out, p2) {
return out + p2 + p2
}]
], "a")
parent1("b")
parent2("c")
parent1("b")
o(child()).equals("abccb")
})
})