add 2 tests, escapeHTML & escapeRegExp
This commit is contained in:
@ -5,6 +5,7 @@ test('Testing escapeHTML', (t) => {
|
|||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof escapeHTML === 'function', 'escapeHTML is a Function');
|
t.true(typeof escapeHTML === 'function', 'escapeHTML is a Function');
|
||||||
|
t.equal(escapeHTML('<a href="#">Me & you</a>'), '<a href="#">Me & you</a>', "Escapes a string for use in HTML");
|
||||||
//t.deepEqual(escapeHTML(args..), 'Expected');
|
//t.deepEqual(escapeHTML(args..), 'Expected');
|
||||||
//t.equal(escapeHTML(args..), 'Expected');
|
//t.equal(escapeHTML(args..), 'Expected');
|
||||||
//t.false(escapeHTML(args..), 'Expected');
|
//t.false(escapeHTML(args..), 'Expected');
|
||||||
|
|||||||
@ -5,6 +5,7 @@ test('Testing escapeRegExp', (t) => {
|
|||||||
//For more information on all the methods supported by tape
|
//For more information on all the methods supported by tape
|
||||||
//Please go to https://github.com/substack/tape
|
//Please go to https://github.com/substack/tape
|
||||||
t.true(typeof escapeRegExp === 'function', 'escapeRegExp is a Function');
|
t.true(typeof escapeRegExp === 'function', 'escapeRegExp is a Function');
|
||||||
|
t.equal(escapeRegExp('(test)'), '\\(test\\)', "Escapes a string to use in a regular expression");
|
||||||
//t.deepEqual(escapeRegExp(args..), 'Expected');
|
//t.deepEqual(escapeRegExp(args..), 'Expected');
|
||||||
//t.equal(escapeRegExp(args..), 'Expected');
|
//t.equal(escapeRegExp(args..), 'Expected');
|
||||||
//t.false(escapeRegExp(args..), 'Expected');
|
//t.false(escapeRegExp(args..), 'Expected');
|
||||||
|
|||||||
Reference in New Issue
Block a user