Skip to content

Commit

Permalink
clean-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
dehmer committed Jun 27, 2023
1 parent ca73cbd commit ebb4046
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions test/flyd.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe('stream', function() {
b(1);
assert.deepEqual(result, [1, 2]);
});
it.skip('[afec - unsupported]can combine streams and project deps as args', function() {
it.skip('[afec - unsupported] can combine streams and project deps as args', function() {
var a = flyd.stream();
var b = flyd.stream(0);
var collect = function(x, y, self) { return (self() || []).concat([x(), y()]); };
Expand Down Expand Up @@ -376,7 +376,7 @@ describe('stream', function() {
x(1);
assert.equal(doubleX(), 2);
});
it.skip('[2b43 - unsupported] handles function returning undefined', function() {
it.skip('[2b43 - incompatible] handles function returning undefined', function() {
var x = stream(1);
var maybeDoubleX = flyd.map(function(x) {
return x > 3 ? 2 * x : undefined;
Expand Down Expand Up @@ -554,7 +554,7 @@ describe('stream', function() {
s1(12)(2); s2(4)(44); s1(1); s2(12)(2);
assert.deepEqual(result, [12, 2, 4, 44, 1, 12, 2]);
});
it.skip('[8ed3 - undefined] should pass defined undefined along', function() {
it.skip('[8ed3 - incompatible] should pass defined undefined along', function() {
var s1 = stream();
var s2 = stream(undefined);
var merged = flyd.merge(s1, s2);
Expand Down
20 changes: 10 additions & 10 deletions test/signal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ describe('Interface Specification', function () {
assert.deepStrictEqual(actual, expected)
})

it('unnamed [40c9]', function () {
it('[40c9] unnamed', function () {
const a = Signal.of()
const b = link(a => a + 1, a)
const c = link((a, b) => a * b, [a, b])
Expand All @@ -310,15 +310,15 @@ describe('Interface Specification', function () {
})

describe('Fantasy Land', function () {
it('map :: Signal s => (a -> b) -> s a -> s b [2d75]', function () {
it('[2d75] map :: Signal s => (a -> b) -> s a -> s b', function () {
const a = Signal.of()
const b = R.map(x => x * 2, a)
assert.strictEqual(b(), undefined)
a(1); assert.strictEqual(b(), 2)
a(2); assert.strictEqual(b(), 4)
})

it('map :: Signal s => (a -> b) -> s a -> s b [af73]', function () {
it('[af73] map :: Signal s => (a -> b) -> s a -> s b', function () {
const a = Signal.of(1)
.map(x => x * 2)
.map(x => x + 1)
Expand Down Expand Up @@ -356,7 +356,7 @@ describe('Interface Specification', function () {
a(2); assert.strictEqual(b(), 6)
})

it('chain :: Signal s => (a -> s b) -> s a -> s b [3646]', async function () {
it('[3646] chain :: Signal s => (a -> s b) -> s a -> s b', async function () {
const expected = [42]
const input = Signal.of()
const output = input.chain(() => R.tap(s => expected.forEach(s), Signal.of()))
Expand All @@ -366,14 +366,14 @@ describe('Interface Specification', function () {
input('go!'); assert.deepStrictEqual(actual, expected)
})

it('chain :: Signal s => (a -> s b) -> s a -> s b [4ae4]', async function () {
it('[4ae4] chain :: Signal s => (a -> s b) -> s a -> s b', async function () {
const expected = 42
const main = Signal.of(expected)
const output = main.chain(v => Signal.of(v))
assert.deepStrictEqual(output(), expected)
})

it('chain :: Signal s => (a -> s b) -> s a -> s b [9cc4]', async function () {
it('[9cc4] chain :: Signal s => (a -> s b) -> s a -> s b', async function () {
// Preserve ordering.
const input = Signal.of()
const a = Signal.of()
Expand Down Expand Up @@ -406,23 +406,23 @@ describe('Interface Specification', function () {
})

describe('miscellaneous operators', function () {
it('startWith :: Signal s => a -> s a -> s a [ae26]', function () {
it('[ae26] startWith :: Signal s => a -> s a -> s a', function () {
// Initial value if signal is undefined.
const a = Signal.of()
const b = startWith(0, a)
assert.strictEqual(b(), 0)
a(1); assert.strictEqual(b(), 1)
})

it('startWith :: Signal s => (() -> a) -> s a -> s a [46de]', function () {
it('[46de] startWith :: Signal s => (() -> a) -> s a -> s a', function () {
// Initial value (from function) if signal is undefined.
const a = Signal.of()
const b = startWith(() => 0, a)
assert.strictEqual(b(), 0)
a(1); assert.strictEqual(b(), 1)
})

it('startWith :: Signal s => a -> s a -> s a [46de]', function () {
it('[46de] startWith :: Signal s => a -> s a -> s a', function () {
// Initial value for linked signal.
const a = Signal.of()
const b = link(a => a + 1, [a])
Expand All @@ -431,7 +431,7 @@ describe('Interface Specification', function () {
a(1); assert.strictEqual(c(), 2)
})

it('startWith :: Signal s => a -> s a -> s a [b308]', function () {
it('[b308] startWith :: Signal s => a -> s a -> s a', function () {
// Initial value is ignored if signal is defined.
const a = Signal.of(1)
const b = startWith(0, a)
Expand Down

0 comments on commit ebb4046

Please sign in to comment.