diff --git a/test/partial/partial.test.js b/test/partial/partial.test.js index 763548f40..4c7b32d1d 100644 --- a/test/partial/partial.test.js +++ b/test/partial/partial.test.js @@ -5,9 +5,14 @@ test('Testing partial', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof partial === 'function', 'partial is a Function'); + function greet(greeting, name) { + return greeting + ' ' + name + '!'; + } + const greetHello = partial(greet, 'Hello'); + t.equal(greetHello('John'), 'Hello John!', 'Prepends arguments'); //t.deepEqual(partial(args..), 'Expected'); //t.equal(partial(args..), 'Expected'); //t.false(partial(args..), 'Expected'); //t.throws(partial(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/partialRight/partialRight.test.js b/test/partialRight/partialRight.test.js index 7fda308da..75b3113b5 100644 --- a/test/partialRight/partialRight.test.js +++ b/test/partialRight/partialRight.test.js @@ -5,9 +5,14 @@ test('Testing partialRight', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof partialRight === 'function', 'partialRight is a Function'); + function greet(greeting, name) { + return greeting + ' ' + name + '!'; + } + const greetJohn = partialRight(greet, 'John'); + t.equal(greetJohn('Hello'), 'Hello John!', 'Appends arguments'); //t.deepEqual(partialRight(args..), 'Expected'); //t.equal(partialRight(args..), 'Expected'); //t.false(partialRight(args..), 'Expected'); //t.throws(partialRight(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/testlog b/test/testlog index 58aa6bc37..9086d6aac 100644 --- a/test/testlog +++ b/test/testlog @@ -1,4 +1,4 @@ -Test log for: Sun Feb 04 2018 16:57:01 GMT+0200 (GTB Standard Time) +Test log for: Sun Feb 04 2018 16:58:46 GMT+0200 (GTB Standard Time) > 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code > tape test/**/*.test.js | tap-spec @@ -1066,10 +1066,12 @@ Test log for: Sun Feb 04 2018 16:57:01 GMT+0200 (GTB Standard Time) Testing partial √ partial is a Function + √ Prepends arguments Testing partialRight √ partialRight is a Function + √ Appends arguments Testing partition @@ -1707,8 +1709,8 @@ Test log for: Sun Feb 04 2018 16:57:01 GMT+0200 (GTB Standard Time) √ Works with multiple promises - total: 811 - passing: 811 + total: 813 + passing: 813 duration: 2.4s