From 03ebfaf7ab2f936828e4cbee608348555987b97b Mon Sep 17 00:00:00 2001 From: David Braun Date: Sun, 15 Oct 2017 12:39:17 -0400 Subject: [PATCH] Move `functional interface` tests out of `select` tests. --- test/index.js | 66 +++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/test/index.js b/test/index.js index 2c82d8e..59be1b2 100644 --- a/test/index.js +++ b/test/index.js @@ -118,43 +118,43 @@ describe(`Channel`, function () { break } }) +}) - describe(`functional interface`, async function () { - describe(`map`, function () { - it(`full application`, async function () { - assert.deepEqual( - await toArray(Channel.map( - (value) => value.toUpperCase(), - Channel.of(`a`, `b`, `c`) - )), - [`A`, `B`, `C`] - ) - }) - - it(`partial application`, async function () { - assert.deepEqual( - await toArray(Channel.map((value) => - value.toUpperCase())(Channel.of(`a`, `b`, `c`)) - ), - [`A`, `B`, `C`] - ) - }) +describe(`functional interface`, async function () { + describe(`map`, function () { + it(`full application`, async function () { + assert.deepEqual( + await toArray(Channel.map( + (value) => value.toUpperCase(), + Channel.of(`a`, `b`, `c`) + )), + [`A`, `B`, `C`] + ) }) - describe(`slice`, function () { - it(`full application`, async function () { - assert.deepEqual( - await toArray(Channel.slice(1, 4, Channel.of(0, 1, 2, 3, 4))), - [1, 2, 3] - ) - }) + it(`partial application`, async function () { + assert.deepEqual( + await toArray(Channel.map((value) => + value.toUpperCase())(Channel.of(`a`, `b`, `c`)) + ), + [`A`, `B`, `C`] + ) + }) + }) - it(`partial application`, async function () { - assert.deepEqual( - await toArray(Channel.slice(1, 4)(Channel.of(0, 1, 2, 3, 4))), - [1, 2, 3] - ) - }) + describe(`slice`, function () { + it(`full application`, async function () { + assert.deepEqual( + await toArray(Channel.slice(1, 4, Channel.of(0, 1, 2, 3, 4))), + [1, 2, 3] + ) + }) + + it(`partial application`, async function () { + assert.deepEqual( + await toArray(Channel.slice(1, 4)(Channel.of(0, 1, 2, 3, 4))), + [1, 2, 3] + ) }) }) })