question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reporter should support all Unicode strings

See original GitHub issue

Description

Let’s make AVA emoji-friendly. Currently it’s difficult to use AVA for testing libraries that perform string operations. Here, errors regarding strings containing emoji appear chopped off and often contain broken characters. Consider the most basic example:

Test Source

test.only('foo', t => {
  t.fail('🦄🐴🦄')
})

Error Message & Stack Trace

Notice the broken symbol:

   1 failed


   1. foo
   🦄�
      Test.fn (test.js:508:5)
npm ERR! Test failed.  See above for more details

Since one emoji .length equals to two, second half of second emoji is cut off. That broken symbol is high-surrogate of second emoji.

Config

{
  "ava": {
    "tap": false
  }
}

Environment

Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:

Node.js v5.11.1
darwin 15.6.0
ava 0.16.0
npm 3.10.7

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sotojuancommented, Sep 18, 2016

Cool, I’ll give it a shot tonight : )

0reactions
reveltcommented, Sep 19, 2016

Good spot, it’s HyperTerm, I can’t recreate the issue on iTerm2 too… Let’s close this issue, thanks for clearing this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unicode support (ros ticket #4053) · Issue #143
I am currently transforming all wstring into utf8-encoded string, but bad things might happen in case non-ASCII characters cause problems. trac ...
Read more >
Support Unicode characters in instance Show String (#20027)
WinIO should have no issues with Unicode at all. Unicode support was one of the reasons for the new I/O manager. Do note...
Read more >
Unit 3 Lab 4: Combining List Operations, Page 1
It lets you break a string at every space and convert the string to a list of words. It's in the Tools library....
Read more >
Add Unicode String in Report Designer
Hello Community,I was trying to add a ✓ symbol in the report designer. For this I inserted the character like this in a...
Read more >
Need to support UNICODE characters in MSSQL server.
characters like char and varchar. Unicode constants are specified with a leading N: N'A Unicode string'. All Unicode data uses the same Unicode...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found