[Bug]: Issue references in test output are not clicable
What Happened
On fresh new Laravel project, It tried adding following on Pest.php
pest()->project()->github('test/test');
and following on the example unit test
test('that true is true', function () {
expect(true)->toBeTrue();
})->todo(issue: 42);
I carefully read https://pestphp.com/docs/team-management and watched Pest 3 Keynote
Based on what I've seen, I expected to have a clicable link (or at least a visible link to https://github.com/test/test/issue/42
But output simply shows
TODO Tests\Unit\ExampleTest - 1 todo
↓ that true is true #42 0.01s
Tests: 1 todo (0 assertions)
Duration: 0.08s
And the string #42 is not clicable
Tested on various terminals (Warp / Terminal.app / PHPStorm builtin), and various shell (zsh / bash)
Did I missed something ? If this is the expected behavior, what is the point of having configured the github project in Pest.php file ?
How to Reproduce
- Fresh install a new Laravel project
- Add
pest()->project()->github('test/test');on top of Pest.php file - Add
->todo(issue: 42);at end of./tests/Unit/ExampleTest.php - Run
./vendor/bin/pest tests/Unit/ExampleTest.php
Sample Repository
No response
Pest Version
4.0.4
PHP Version
8.4.8
Operation System
macOS
Notes
No response
This is working correctly for me on macOS with iTerm2. What terminal are you using? 👀
From what I remember, the default "Terminal" application doesn't support links (unless the full URL is in the output) and many other modern terminal features.
As mentioned above, i tested on various terminals (Warp / Terminal.app / PHPStorm builtin), and various shell (zsh / bash)
iTerm was THE one I didn't tested, and of course... it works on it
Any clue on how to make it working on others ?
This looks definitely Terminal-related. I found this related open issue for Warp https://github.com/warpdotdev/Warp/issues/4194
@owenvoke The best way to work-around on unsupported terminal would be an option to display full url in console output instead of an hyperlink.
I would be happy to contribute on this. Would you accept a PR introducing a new PEST_ environment variable to turn this behavior on ?
Apologies, I completely glossed over that you'd listed the terminals. 😅
I think that makes sense to have as an option (for emulators that don't support OSC 8, here's a list of emulators that do). @nunomaduro, what do you think?