Why Jest use `\u221A` as test pass icon on Windows - jestjs

As this link shown, Jest uses a square root mark \u221A on Windows as icon, not the real check mark \u2713. The former will display more like a √ ̅ ̅ style on some font like Fira Code.
But why does Jest do that, is there some unicode issue on Windows, I can use console.log("\u2713") to get a correct check mark on Chrome 96.0.4664.45, Windows 19044.1348

Related

Change jest test output (iTerm being weird)

I am using latest iTerm on catalina with the "Semantic History" feature which allows you to Cmd+Click urls and filename/paths in the terminal. I set iTerm to open vscode:
This seems to work well if the text is like "src/foo/bar.js:3:3" - however if the text is like "src/foo/bar.js" it treats it like a file url. When you hold CMD and hover over these pure file paths, it shows the full file url in the bottom right, just like when you hover over links inside a browser:
What ends up happening with the file:// url is it will open the default app specified by the OS. On one hand, iterm should be smart enough to know that we want to open files in our editor... On the other hand, it would be nice if Jest also added the column and line number for iterm to recognize.
Turns out, clicking the last stack frame at bottom of the stack trace goes directly to the highlighted error line+column number.

How to change the font of Visual Studio Code's UI?

I'm trying to figure out how to change the font used in non-editor tabs in Visual Studio Code; right now this is what I'm getting (zoom the picture to better see what I'm referring to):
As you can see, a Serif font is used on these non-editor tabs (extension info, Git Graph tab, etc.), making it quite unpleasant and really hard to read.
This happened all of a sudden, I'm quite sure that it is not the default and a nicer and more readable Sans font was used before (like on the left panel), until this problem occurred. I've tried to find if it is possible to change this from inside VSC, but I'm only able to change the fonts used in the editor tabs.
I don't know why and how this behavior has started, and I'm not really sure if this issue is caused by VSC itself, by an extension, by the OS, or something else.
If it matters, I'm working on Linux, on a fully updated openSUSE Tumbleweed with KDE, and like I said this problem started to manifest itself only recently, it was not how it worked by default.
Any clue on how to solve this?
Visual Studio Code does not offer convenient solution out of the box to change the UI font family.
But a developer created the Customize UI plugin for VS Code.
⚠️ EDIT 02/01/2023: following the version 1.74, the Customize UI plugin no longer work, see here. There is currently no ways to change the font in VSCode.
Setup
Install the Customize UI plugin
Restart VS Code
Open VS Code Settings
Change Customize UI Font:Monospace to Fira Code
Change Customize UI Font:Regular to Helvetica Nueve or Arial depending on your OS
Alternativaly, you can edit those settings using the json settings editor as follow:
"customizeUI.font.regular": "Helvetica Nueve",
"customizeUI.font.monospace": "Fira Code",
GitHub issue here
vscode is an electron app so you can actually just open up the developer tools in the help menu, look up the location of workbench.desktop.main.css under the source tab, make a backup and edit the font-family rule for your OS.
There's a pretty gnarly-phrased notification that pops up about vscode being corrupted, however the linked-documentation is fairly clear it's just unsupported officially.
In most of the Linux distributions we get the option to change the fonts systemwide if you are okay with changing the system font.

macOS Sublime Text 3: How do I disable one window / tabbed windows?

Not to long ago (well, maybe months and months), Sublime 3 has started launching as a singular window with tabbed windows that have their own tabs. I despise this approach. See screen shot:
How do I disable this behavior?
Version 3.1.1 build 3176
The only Packages I have installed are:
A File Icon
Groovy Snippets
Material Theme
Package Control
Pretty JSON
This particular feature is something that's happening as a result of your using MacOS (i.e. it's not something that Sublime does natively; the OS is doing it on your behalf).
In the general case most MacOS applications should have native menu items to combine windows together like this at the user's request in combination with the Prefer tabs when opening documents setting in the Dock area of the system preferences.
Sublime doesn't support the native menu items for this (yet), so it relies solely on the setting; having it set to Always (and also In Full Screen Only, but this tends to cause problems with Sublime) makes MacOS automatically "tab" new windows. Setting that setting to Manually stops this from happening.
This is also somewhat controlled by the Theme that you're using in Sublime. For MacOS, a Sublime theme can theme the menu bar of the window to match the overall application theme. Behind the scenes, this makes Sublime declare to MacOS that it wants to be in charge of displaying it's own window, which stops the system from automatically combining windows together.
An example of a theme that does this is the Adaptive theme that ships with Sublime.

Same executable with different icons

I want to open a pdf-viewer (okular) with different icons from the gnome-console.
Basically I want to differentiate between pdfs I am reading. Some would have the default okular icon, but I would like to have a different/special icon for the pdf generated by the LaTeX document I am editing.
Thinking about how to do this, I realized that I am not sure how gnome knows what icon to use when I execute /usr/bin/okular from the console. How is that bin related with an icon, no .desktop file involved right?
Applications set their icon at launch, to a compiled-in value. Most do it using the API of their graphics toolkit (Gtk provides various forms of the gtk_window_set_icon API call), but it has its roots in an X Windows window-manager property that's as old as dirt — which is why, for example, okular still has an application icon in Gnome Shell even though it's a KDE application.
You can see a grayscale representation of the icon(s) an application is exporting if you type xprop in a terminal, then click the application's window. (You need to have the correct utilities package installed, it's called xorg-x11-utils in Fedora.)
The application icon doesn't depend on Gnome or on the .desktop file under any circumstances.
(In fact, you could create your own $HOME/.local/share/applications/okular.desktop file that represented the application with a different icon, and launch it by clicking that icon, but it would be ignored in favor of the one that's compiled in to the application once it started. I have some custom launchers in my Favorites panel for different VNC sessions, using a different icon for each, but they all show up as TigerVNC with the standard icon when launched.)
AFAIK the only way to do what you want would be to compile your own separate version of okular with the icon changed to something else. That's just not the way application icons were meant to be used, sorry.

Delphi inspect shows {L at start of all Strings

I have this issue where if I inspect a string in Delphi it always starts with {L and ends with another }
So for an example, I create a variable tempStr that is a string. I do the following code:
tempStr := 'hello';
When I put a break-point on the next line and stop there to inspect tempStr the yellow Delphi inspect window will show
{L"he"}
This started happening recently, within the last 2 weeks. I was working on protobufs for java to delphi. At first I thought it was happening because I was passing a pointer to a pointer which was filling some of my variables with random characters but I've since moved onto another project with different code and I'm still getting this inspect issue.
Edit: my example was wrong, this issue ends up cutting off the last 3 characters of any of my strings, essentially the amount of characters that the {L } take up. I have edited the above example to show exactly what I see upon inspection.
As far as Delphi addons go I have: DDev Extensions 2.83, CodeSiteExpress 5.1, Fast Report 4 and Mad Except 4.0.11
The inspector is simply showing you that the string content is Unicode and not Ansi in nature. But the fact that it is showing you in C++ syntax makes me think that maybe a custom Debugger Visualizer was installed that is overriding the default string inspector. The default inspector looks like this instead:
Go into the Debugger's Visualizer settings (Tools > Options > Debugger Options > Visualizers) and check if there are extra visualizers registered and enabled. The IDE ships with only 3 default visualizers preinstalled:
What you describe sounds like maybe a custom visualizer is manipulating the default inspector text buffer with different characters.
As per Warren P's suggestion I tried completely unregister the C++ debug visualizer package.
In (Tools > Options > Debugger Options > Visualizers) this is:
std::string and std::wstring Visualizer for C++
After I had this packaged unregistered I noticed that my problem was fixed. I was unsure of exactly what this package all did so I didn't want to leave it disabled. I then restarted Delphi with the package still disabled and upon starting Delphi again I re-enabled the package. Everything seems to be working now and the problem is fixed. So the solution was disable and re-enable this visualizer package.
I too have had this problem not solved by any of the suggestions given. In a project containing a significant number of packages there were one or two BPLs that would always show in the {L"he"} style. These packages all had compiler warnings regarding implicitly imported units. Resolving these issues enabled strings to be displayed correctly in the debugger.

Resources