Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some edge cases #6

Open
thommeo opened this issue Apr 24, 2019 · 0 comments
Open

Some edge cases #6

thommeo opened this issue Apr 24, 2019 · 0 comments

Comments

@thommeo
Copy link

thommeo commented Apr 24, 2019

Hi thank you for the great library.

I have discovered some names, that the conversion produces unexpected results.

Here are my test cases:

[
"Yuri's",
"van den Thillart",
"Ruiz y Picasso,"
"Dato e Iradier",
"Mas i Gavarró",
"Fred XLIX",
"Yusof bin Ishak"
]

The names are taken from Ruby variant of the library: https://github.com/tenderlove/namecase/blob/master/test/test_namecase.rb

Here are the results:

  1) Capitalize name
       should convert "YURI'S" to "Yuri's":

      AssertionError: expected 'Yuri\'S' to equal 'Yuri\'s'
      + expected - actual

      -Yuri'S
      +Yuri's
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)

  2) Capitalize name
       should convert "VAN DEN THILLART" to "van den Thillart":

      AssertionError: expected 'van Den Thillart' to equal 'van den Thillart'
      + expected - actual

      -van Den Thillart
      +van den Thillart
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)

  3) Capitalize name
       should convert "RUIZ Y PICASSO" to "Ruiz y Picasso":

      AssertionError: expected 'Ruiz yPicasso' to equal 'Ruiz y Picasso'
      + expected - actual

      -Ruiz yPicasso
      +Ruiz y Picasso
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)

  4) Capitalize name
       should convert "DATO E IRADIER" to "Dato e Iradier":

      AssertionError: expected 'Dato E Iradier' to equal 'Dato e Iradier'
      + expected - actual

      -Dato E Iradier
      +Dato e Iradier
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)

  5) Capitalize name
       should convert "MAS I GAVARRÓ" to "Mas i Gavarró":

      AssertionError: expected 'Mas I Gavarró' to equal 'Mas i Gavarró'
      + expected - actual

      -Mas I Gavarró
      +Mas i Gavarró
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)

  6) Capitalize name
       should convert "FRED XLIX" to "Fred XLIX":

      AssertionError: expected 'Fred Xlix' to equal 'Fred XLIX'
      + expected - actual

      -Fred Xlix
      +Fred XLIX
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)

  7) Capitalize name
       should convert "YUSOF BIN ISHAK" to "Yusof bin Ishak":

      AssertionError: expected 'Yusof Bin Ishak' to equal 'Yusof bin Ishak'
      + expected - actual

      -Yusof Bin Ishak
      +Yusof bin Ishak
      
      at Context.it (app/utils/capitalize-name.spec.js:73:29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant