UNPKG

@eluvio/elv-js-helpers

Version:

A collection of Javascript helper functions used by several Eluvio libraries.

14 lines (12 loc) 509 B
// AUTO-GENERATED TEST - DO NOT MODIFY, CHANGES WILL BE OVERWRITTEN DURING BUILD 'use strict' const TH = require('../../../test-helpers') const escapeForRegExp = TH.requireSrcFile('Conversion/escapeForRegExp') describe('escapeForRegExp JSDoc example', () => { it('should execute correctly as described', () => { 'use strict' escapeForRegExp('foo').should.eql('foo') escapeForRegExp('/').should.eql('/') TH.expect(() => escapeForRegExp(42)).to.throw('str.replace is not a function') }) })