Skip to content

Commit

Permalink
Skip static rendering tests on Fedora versions where V8 lacks i18n su…
Browse files Browse the repository at this point in the history
…pport
  • Loading branch information
glin committed Dec 6, 2022
1 parent 990316e commit 029e6c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# reactable 0.4.0.9000 (Unreleased)

* Fixed a failing test on Fedora 36 and earlier.

# reactable 0.4.0

[Documentation - reactable 0.4.0](https://v0-4-0--reactable-docs.netlify.app/)
Expand Down
13 changes: 13 additions & 0 deletions tests/testthat/test-reactable.R
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,19 @@ test_that("reactable.yaml widget dependencies are included with correct version"

# Static rendering (experimental)
test_that("static rendering", {
# Skip static rendering tests if V8 was built against a version of libv8 without
# ICU / i18n support. If running on Fedora, this is an issue with Fedora's V8 package
# that was fixed in Fedora 37. The workaround on Fedora <= 36 is to build the V8
# R package using DOWNLOAD_STATIC_LIBV8=true.
# https://github.com/jeroen/V8/issues/65
# https://bugzilla.redhat.com/show_bug.cgi?id=1755114
tryCatch({
V8::new_context()$eval("''.localeCompare('')")
}, error = function(e) {
# If libv8 lacks i18n support, the error is typically: "RangeError: Internal error: Icu error."
skip("V8 was built against a version of libv8 without i18n support")
})

data <- data.frame(
x = c(1, 2),
y = c("a", "column-y-cell"),
Expand Down

0 comments on commit 029e6c3

Please sign in to comment.