Implemented suggesting improvements

This commit is contained in:
Angelos Chalaris
2018-02-19 15:47:47 +02:00
parent 46efdf1bc0
commit c385cd66bf
17 changed files with 1126 additions and 1092 deletions

View File

@ -0,0 +1,16 @@
const test = require('tape');
const stringPermutations = require('./stringPermutations.js');
test('Testing stringPermutations', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof stringPermutations === 'function', 'stringPermutations is a Function');
t.deepEqual(stringPermutations('abc'), ['abc','acb','bac','bca','cab','cba'], "Generates all stringPermutations of a string");
t.deepEqual(stringPermutations('a'), ['a'], "Works for single-letter strings");
t.deepEqual(stringPermutations(''), [''], "Works for empty strings");
//t.deepEqual(anagrams(args..), 'Expected');
//t.equal(anagrams(args..), 'Expected');
//t.false(anagrams(args..), 'Expected');
//t.throws(anagrams(args..), 'Expected');
t.end();
});