コード例 #1
0
  it( 'should escape a comma', () => {
    string = 'Students, Parents, and Teachers';

    expect( strings.stringEscape( string ) )
      .to.equal( 'Students, Parents, and Teachers' );
  } );
コード例 #2
0
  it( 'should escape a url', () => {
    string = 'http://google.com';

    expect( strings.stringEscape( string ) )
      .to.equal( 'http://google\\.com' );
  } );
コード例 #3
0
  it( 'should escape a hyphenated name', () => {
    string = 'Miller-Webster';

    expect( strings.stringEscape( string ) )
      .to.equal( 'Miller\\-Webster' );
  } );