Skip to content

test: add unit tests for combine_supp function #44

test: add unit tests for combine_supp function

test: add unit tests for combine_supp function #44

Workflow file for this run

name: Spellcheck
on:
pull_request:
branches: ['main']
jobs:
Spelling:
runs-on: ubuntu-latest
container:
image: "rocker/tidyverse:4.3.1"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install packages
run: |
if (!require("roxygen2")) install.packages("roxygen2")
if (!require("spelling")) install.packages("spelling")
if (!require("testthat")) install.packages("testthat")
shell: Rscript {0}
- name: Check spelling
run: |
library(spelling)
# Check the entire package (R files, documentation, vignettes, etc.)
words <- spelling::spell_check_package()
print(words)
testthat::test_that(desc = "Check spelling", code = {
testthat::expect_equal(
object = nrow(words),
expected = 0,
info = if (nrow(words) > 0) {
paste("Spelling errors found:\n",
paste(capture.output(print(words)), collapse = "\n"))
} else {
"No spelling errors"
}
)
})
shell: Rscript {0}