Skip to content

Commit 029e6c3

Browse files
committed
Skip static rendering tests on Fedora versions where V8 lacks i18n support
1 parent 990316e commit 029e6c3

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# reactable 0.4.0.9000 (Unreleased)
22

3+
* Fixed a failing test on Fedora 36 and earlier.
4+
35
# reactable 0.4.0
46

57
[Documentation - reactable 0.4.0](https://v0-4-0--reactable-docs.netlify.app/)

tests/testthat/test-reactable.R

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,19 @@ test_that("reactable.yaml widget dependencies are included with correct version"
13441344

13451345
# Static rendering (experimental)
13461346
test_that("static rendering", {
1347+
# Skip static rendering tests if V8 was built against a version of libv8 without
1348+
# ICU / i18n support. If running on Fedora, this is an issue with Fedora's V8 package
1349+
# that was fixed in Fedora 37. The workaround on Fedora <= 36 is to build the V8
1350+
# R package using DOWNLOAD_STATIC_LIBV8=true.
1351+
# https://github.com/jeroen/V8/issues/65
1352+
# https://bugzilla.redhat.com/show_bug.cgi?id=1755114
1353+
tryCatch({
1354+
V8::new_context()$eval("''.localeCompare('')")
1355+
}, error = function(e) {
1356+
# If libv8 lacks i18n support, the error is typically: "RangeError: Internal error: Icu error."
1357+
skip("V8 was built against a version of libv8 without i18n support")
1358+
})
1359+
13471360
data <- data.frame(
13481361
x = c(1, 2),
13491362
y = c("a", "column-y-cell"),

0 commit comments

Comments
 (0)