Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
view-container / src / utils / test / escape.test.tsx
Size: Mime:
// @flow
import escape from '../escape'

describe('escape', () => {
  it('replaces characters that could be part of CSS selectors', () => {
    expect(escape('foo(bar):#*$><+~=|^baz')).toEqual('foo-bar-baz')
  })

  it('replaces double hyphens with a single hyphen', () => {
    expect(escape('foo--bar')).toEqual('foo-bar')
  })

  it('removes extraneous hyphens at the ends of the string', () => {
    expect(escape('-foo--bar-')).toEqual('foo-bar')
  })
})