diff --git a/test/pluralize/pluralize.test.js b/test/pluralize/pluralize.test.js index 219f80886..674244ca7 100644 --- a/test/pluralize/pluralize.test.js +++ b/test/pluralize/pluralize.test.js @@ -5,9 +5,19 @@ test('Testing pluralize', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof pluralize === 'function', 'pluralize is a Function'); + t.equal(pluralize(0, 'apple'), 'apples', 'Produces the plural of the word'); + t.equal(pluralize(1, 'apple'), 'apple', 'Produces the singular of the word'); + t.equal(pluralize(2, 'apple'), 'apples', 'Produces the plural of the word'); + t.equal(pluralize(2, 'person', 'people'), 'people', 'Prodices the defined plural of the word'); + const PLURALS = { + person: 'people', + radius: 'radii' + }; + const autoPluralize = pluralize(PLURALS); + t.equal(autoPluralize(2, 'person'), 'people', 'Works with a dictionary'); //t.deepEqual(pluralize(args..), 'Expected'); //t.equal(pluralize(args..), 'Expected'); //t.false(pluralize(args..), 'Expected'); //t.throws(pluralize(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/testlog b/test/testlog index 066ab2e90..b5aa7ffa1 100644 --- a/test/testlog +++ b/test/testlog @@ -1,4 +1,4 @@ -Test log for: Sun Feb 04 2018 20:53:05 GMT+0200 (GTB Standard Time) +Test log for: Sun Feb 04 2018 20:56:18 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 @@ -1114,6 +1114,11 @@ Test log for: Sun Feb 04 2018 20:53:05 GMT+0200 (GTB Standard Time) Testing pluralize √ pluralize is a Function + √ Produces the plural of the word + √ Produces the singular of the word + √ Produces the plural of the word + √ Prodices the defined plural of the word + √ Works with a dictionary Testing powerset @@ -1713,8 +1718,8 @@ Test log for: Sun Feb 04 2018 20:53:05 GMT+0200 (GTB Standard Time) √ Works with multiple promises - total: 820 - passing: 820 + total: 825 + passing: 825 duration: 2.4s