pestphp / pestphp/pest

[Bug]: Issue references in test output are not clicable

Open
#1,507 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

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
  1. Fresh install a new Laravel project
  2. Add pest()->project()->github('test/test'); on top of Pest.php file
  3. Add ->todo(issue: 42); at end of ./tests/Unit/ExampleTest.php
  4. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with vendor/bin/pest tests/Unit/ExampleTest.php after configuring the project in Pest.php and adding todo(issue: 42) to tests/Unit/ExampleTest.php. Inspect how the test output represents the issue reference, then verify that the output provides the expected clickable or visible GitHub issue link.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.