Skip to content

Commit

Permalink
update tests with quarto
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Jun 27, 2024
1 parent c590391 commit 9abd2b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
run: |
remotes::install_deps(dependencies = TRUE, force = TRUE)
remotes::install_cran("devtools")
install.packages("quarto")
sessionInfo()
shell: Rscript {0}

Expand Down
10 changes: 1 addition & 9 deletions tests/testthat/test-quizzes.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ test_that("Quiz checks", {
bad_quiz <- readLines(bad_quiz_path())
bad_quiz_specs <- parse_quiz(bad_quiz)

# THe following checks *should fail* because we're giving it a bad quiz.
bad_quiz_checks <- try(check_all_questions(bad_quiz_specs), silent = TRUE)

## Make a temporary quiz directory
quiz_dir <- dirname(good_quiz_path())

## Now check the quizzes in that directory
# The following checks *should also fail* because the bad quiz is in there
all_quiz_results <- try(check_quizzes(quiz_dir = quiz_dir), silent = TRUE)

## TEST HERE:
# 1. quiz_error_report.tsv should be made
# 2. bad quiz should have errors
# 3. good quiz should pass!
# 2. good quiz should pass!

})

0 comments on commit 9abd2b2

Please sign in to comment.