diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index c9f0165..731c3c1 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -26,6 +26,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + - uses: r-lib/actions/setup-pandoc@v2 - uses: r-lib/actions/setup-r@v2 diff --git a/tests/testthat/_snaps/used_there.md b/tests/testthat/_snaps/used_there.md index c8fa638..a553436 100644 --- a/tests/testthat/_snaps/used_there.md +++ b/tests/testthat/_snaps/used_there.md @@ -18,3 +18,14 @@ ! `num_links` must be a scalar x You've supplied a object of length 3. +# Get links + + Code + get_links(html, "https://www.quantumjitter.com/project/", 5) + Output + [1] "https://www.quantumjitter.com/project/planning/" + [2] "https://www.quantumjitter.com/project/stories/" + [3] "https://www.quantumjitter.com/project/sw10/" + [4] "https://www.quantumjitter.com/project/sets/" + [5] "https://www.quantumjitter.com/project/jitter/" + diff --git a/tests/testthat/test-used_there.R b/tests/testthat/test-used_there.R index 7b294ce..a16e9e9 100644 --- a/tests/testthat/test-used_there.R +++ b/tests/testthat/test-used_there.R @@ -27,3 +27,10 @@ test_that("First 3 lines of the first link", { ) ) }) + +test_that("Get links", { + html <- rvest::read_html("https://www.quantumjitter.com/project/") + expect_snapshot( + get_links(html, "https://www.quantumjitter.com/project/", 5) + ) +})