UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

14 lines (10 loc) 364 B
import expect from 'expect'; import escapePath from './escapePath'; describe('escapePath', () => { it('escapes parentheses', () => { expect(escapePath('/foo(bar)')).toEqual('/foo\\(bar\\)'); }); it('escapes backslashes before escaping parentheses', () => { expect(escapePath('/foo\\(bar)')).toEqual('/foo\\\\\\(bar\\)'); }); });