Files
30-seconds-of-code/test/escapeRegExp/escapeRegExp.test.js
Angelos Chalaris bde73c95e8 Updated testing with proper indentation
Uses two spaces instead of hard tabs.
2018-01-24 17:53:36 +02:00

14 lines
615 B
JavaScript

const test = require('tape');
const escapeRegExp = require('./escapeRegExp.js');
test('Testing escapeRegExp', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
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.equal(escapeRegExp(args..), 'Expected');
//t.false(escapeRegExp(args..), 'Expected');
//t.throws(escapeRegExp(args..), 'Expected');
t.end();
});