Skip to content

Instantly share code, notes, and snippets.

@timaschew
Created July 3, 2014 12:10
Show Gist options
  • Save timaschew/04b98ca782edf391efee to your computer and use it in GitHub Desktop.
Save timaschew/04b98ca782edf391efee to your computer and use it in GitHub Desktop.
edge case tests for a palindrom checker, can you implement it?
describe 'palindrome checker', ->
it 'should work for unicode characters (chinese)', (done) ->
expect(palindromChecka "楚人楚").to.equal true
done()
# http://apps.timwhitlock.info/emoji/tables/unicode
it 'should work with 3 byte unicode chars (emoji, unicode)', (done) ->
expect(palindromChecka "\u2764").to.equal true
done()
it 'should work with 4 byte unicode chars (emoji, raw)', (done) ->
expect(palindromChecka "😁").to.equal true
done()
it 'should work with 4 byte unicode chars (emoji, unicode)', (done) ->
expect(palindromChecka "\u1F601").to.equal true
done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment