Bläddra i källkod

Updated the name: final => finalValue.

Eugene Lazutkin 3 år sedan
förälder
incheckning
71b5161c0a
3 ändrade filer med 10 tillägg och 10 borttagningar
  1. 4 4
      tests/test_comp.js
  2. 5 5
      tests/test_gen.js
  3. 1 1
      tests/test_transducers.js

+ 4 - 4
tests/test_comp.js

@@ -9,7 +9,7 @@ const {fromIterable} = require('../utils/FromIterable');
 const comp = require('../utils/comp');
 const asFun = require('../utils/asFun');
 
-const {none, final, many} = Chain;
+const {none, finalValue, many} = Chain;
 
 unit.add(module, [
   function test_comp(t) {
@@ -29,7 +29,7 @@ unit.add(module, [
     const output = [],
       chain = new Chain([
         fromIterable([1, 2, 3]),
-        comp(x => x * x, x => final(x), x => 2 * x + 1),
+        comp(x => x * x, x => finalValue(x), x => 2 * x + 1),
         streamToArray(output)
       ]);
 
@@ -143,7 +143,7 @@ unit.add(module, [
           x => many([x, x * 10]),
           function*(x) {
             yield x;
-            yield final(x - 1);
+            yield finalValue(x - 1);
           },
           x => -x
         ),
@@ -166,7 +166,7 @@ unit.add(module, [
           x => many([x, x * 10]),
           function*(x) {
             yield x;
-            yield final(x - 1);
+            yield finalValue(x - 1);
           },
           x => -x
         ),

+ 5 - 5
tests/test_gen.js

@@ -9,7 +9,7 @@ const {fromIterable} = require('../utils/FromIterable');
 const gen = require('../utils/gen');
 const asGen = require('../utils/asGen');
 
-const {none, final, many} = Chain;
+const {none, finalValue, many} = Chain;
 
 unit.add(module, [
   function test_gen(t) {
@@ -29,7 +29,7 @@ unit.add(module, [
     const output = [],
       chain = new Chain([
         fromIterable([1, 2, 3]),
-        gen(x => x * x, x => final(x), x => 2 * x + 1),
+        gen(x => x * x, x => finalValue(x), x => 2 * x + 1),
         streamToArray(output)
       ]);
 
@@ -143,7 +143,7 @@ unit.add(module, [
           x => many([x, x * 10]),
           function*(x) {
             yield x;
-            yield final(x - 1);
+            yield finalValue(x - 1);
           },
           x => -x
         ),
@@ -166,7 +166,7 @@ unit.add(module, [
           x => many([x, x * 10]),
           function*(x) {
             yield x;
-            yield final(x - 1);
+            yield finalValue(x - 1);
           },
           x => -x
         ),
@@ -189,7 +189,7 @@ unit.add(module, [
           x => many([x, x * 10]),
           async function*(x) {
             yield delay(x => x)(x);
-            yield delay(x => final(x - 1))(x);
+            yield delay(x => finalValue(x - 1))(x);
           },
           x => -x
         ),

+ 1 - 1
tests/test_transducers.js

@@ -24,7 +24,7 @@ unit.add(module, [
     const output = [],
       chain = new Chain([
         fromIterable([1, 2, 3]),
-        [x => x * x, x => Chain.final(x), x => 2 * x + 1],
+        [x => x * x, x => Chain.finalValue(x), x => 2 * x + 1],
         streamToArray(output)
       ]);