"use strict" and other linty fixes
This commit is contained in:
parent
aaa6de784b
commit
1cc5fa5ba7
50 changed files with 463 additions and 478 deletions
|
|
@ -22,7 +22,7 @@ o.spec("scan", function() {
|
|||
parent(7)
|
||||
parent("11")
|
||||
parent(undefined)
|
||||
parent({ a: 1 })
|
||||
parent({a: 1})
|
||||
var result = child()
|
||||
|
||||
// deepEquals fails on arrays?
|
||||
|
|
@ -32,4 +32,3 @@ o.spec("scan", function() {
|
|||
o(result[3]).deepEquals({a: 1})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
"use strict"
|
||||
|
||||
var o = require("../../ospec/ospec")
|
||||
var callAsync = require("../../test-utils/callAsync")
|
||||
var Stream = require("../stream")
|
||||
|
||||
o.spec("stream", function() {
|
||||
|
|
@ -105,7 +104,7 @@ o.spec("stream", function() {
|
|||
var streams = []
|
||||
var a = Stream()
|
||||
var b = Stream()
|
||||
var c = Stream.combine(function(a, b, changed) {
|
||||
Stream.combine(function(a, b, changed) {
|
||||
streams = changed
|
||||
}, [a, b])
|
||||
|
||||
|
|
@ -119,7 +118,7 @@ o.spec("stream", function() {
|
|||
var streams = []
|
||||
var a = Stream(3)
|
||||
var b = Stream(5)
|
||||
var c = Stream.combine(function(a, b, changed) {
|
||||
Stream.combine(function(a, b, changed) {
|
||||
streams = changed
|
||||
}, [a, b])
|
||||
|
||||
|
|
@ -130,7 +129,7 @@ o.spec("stream", function() {
|
|||
})
|
||||
o("combine can return undefined", function() {
|
||||
var a = Stream(1)
|
||||
var b = Stream.combine(function(a) {
|
||||
var b = Stream.combine(function() {
|
||||
return undefined
|
||||
}, [a])
|
||||
|
||||
|
|
@ -138,7 +137,7 @@ o.spec("stream", function() {
|
|||
})
|
||||
o("combine can return stream", function() {
|
||||
var a = Stream(1)
|
||||
var b = Stream.combine(function(a) {
|
||||
var b = Stream.combine(function() {
|
||||
return Stream(2)
|
||||
}, [a])
|
||||
|
||||
|
|
@ -146,7 +145,7 @@ o.spec("stream", function() {
|
|||
})
|
||||
o("combine can return pending stream", function() {
|
||||
var a = Stream(1)
|
||||
var b = Stream.combine(function(a) {
|
||||
var b = Stream.combine(function() {
|
||||
return Stream()
|
||||
}, [a])
|
||||
|
||||
|
|
@ -155,10 +154,9 @@ o.spec("stream", function() {
|
|||
o("combine can halt", function() {
|
||||
var count = 0
|
||||
var a = Stream(1)
|
||||
var b = Stream.combine(function(a) {
|
||||
var b = Stream.combine(function() {
|
||||
return Stream.HALT
|
||||
}, [a])
|
||||
["fantasy-land/map"](function() {
|
||||
}, [a])["fantasy-land/map"](function() {
|
||||
count++
|
||||
return 1
|
||||
})
|
||||
|
|
@ -170,7 +168,7 @@ o.spec("stream", function() {
|
|||
var a = Stream(1)
|
||||
var thrown = null;
|
||||
try {
|
||||
var b = Stream.combine(spy, [a, ''])
|
||||
Stream.combine(spy, [a, ""])
|
||||
} catch (e) {
|
||||
thrown = e
|
||||
}
|
||||
|
|
@ -210,8 +208,9 @@ o.spec("stream", function() {
|
|||
var a = Stream()
|
||||
var b = Stream()
|
||||
|
||||
var all = Stream.merge([a.map(id), b.map(id)]).map(function(data) {
|
||||
Stream.merge([a.map(id), b.map(id)]).map(function(data) {
|
||||
value = data[0] + data[1]
|
||||
return undefined
|
||||
})
|
||||
|
||||
a(1)
|
||||
|
|
@ -344,7 +343,7 @@ o.spec("stream", function() {
|
|||
})
|
||||
o("works with pending stream", function() {
|
||||
var stream = Stream(undefined)
|
||||
var mapped = stream["fantasy-land/map"](function(value) {return Stream()})
|
||||
var mapped = stream["fantasy-land/map"](function() {return Stream()})
|
||||
|
||||
o(mapped()()).equals(undefined)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue