# Broken link in unit test documentation

**URL:** <https://discourse.julialang.org/t/broken-link-in-unit-test-documentation/111514>\
**Category:** General Usage\
**Tags:** documentation\
**Created:** [March 12, 2024, 11:59am UTC](https://discourse.julialang.org/t/broken-link-in-unit-test-documentation/111514 "2024-03-12T11:59:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhavkrishnan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/madhavkrishnan/32/29368_2.png) [@madhavkrishnan](https://discourse.julialang.org/u/madhavkrishnan)\
**Post date:** [March 12, 2024, 11:59am UTC](https://discourse.julialang.org/t/broken-link-in-unit-test-documentation/111514/1 "2024-03-12T11:59:08Z")

</div>

I was reading the documentation on unit tests at

[https://docs.julialang.org/en/v1/stdlib/Test/#~:text=adding%20tests%20to%20your%20Julia%20Package.](https://docs.julialang.org/en/v1/stdlib/Test/#:~:text=adding%20tests%20to%20your%20Julia%20Package.). The highligted link which resolves to  
[https://pkgdocs.julialang.org/dev/creating-packages/#Adding-tests-to-the-package](https://pkgdocs.julialang.org/dev/creating-packages/#Adding-tests-to-the-package)  
appears to be broken.

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/224680_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [March 12, 2024, 12:36pm UTC](https://discourse.julialang.org/t/broken-link-in-unit-test-documentation/111514/2 "2024-03-12T12:36:15Z")

</div>

Good catch! I think the correct link is [https://pkgdocs.julialang.org/v1/creating-packages/#Adding-tests-to-the-package](https://pkgdocs.julialang.org/v1/creating-packages/#Adding-tests-to-the-package) now

Do you want to try and fix the documentation yourself? All you have to do is click the “Edit on GitHub” button at the top right of the page, and then follow along 🙂 I can help if you’re stuck

---

<div class="post-metadata">

**Author:** ![madhavkrishnan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/madhavkrishnan/32/29368_2.png) [@madhavkrishnan](https://discourse.julialang.org/u/madhavkrishnan)\
**Post date:** [March 12, 2024, 12:56pm UTC](https://discourse.julialang.org/t/broken-link-in-unit-test-documentation/111514/3 "2024-03-12T12:56:10Z")

</div>

Happy to give it a shot. The line that needs to be changed is at this [link](https://github.com/JuliaLang/julia/blob/master/stdlib/Test/docs/src/index.md#:~:text=%5Badding%20tests%20to%20your%20Julia%20Package%5D(%40ref%20adding%2Dtests%2Dto%2Dpackages)). But it appears to be using some kind of reference macro I am not familiar with → [adding tests to your Julia Package](@ref adding-tests-to-packages)

Any idea where this is defined or how to change it? I assume the original author does not want to hard code urls in the documentation.

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/224680_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [March 12, 2024, 1:09pm UTC](https://discourse.julialang.org/t/broken-link-in-unit-test-documentation/111514/4 "2024-03-12T13:09:16Z")

</div>

> [@madhavkrishnan](#):
>
> But it appears to be using some kind of reference macro I am not familiar with

This is from Documenter.jl:

[https://documenter.juliadocs.org/stable/man/syntax/#@ref-link](https://documenter.juliadocs.org/stable/man/syntax/#@ref-link)

> [@madhavkrishnan](#):
>
> Any idea where this is defined or how to change it? I assume the original author does not want to hard code urls in the documentation.

Apparently it’s supposed to point to a subsection from a tutorial:

[https://github.com/search?q=repo%3AJuliaLang%2Fjulia%20adding-tests-to-packages&type=code](https://github.com/search?q=repo%3AJuliaLang%2Fjulia%20adding-tests-to-packages&type=code)

No idea why that doesn’t work
