Skip to content

Commit

Permalink
Update tests for jsonlite 1.8.7 max digits fix
Browse files Browse the repository at this point in the history
  • Loading branch information
glin committed Jul 14, 2023
1 parent 6da55ee commit 86bd276
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/_snaps/reactable.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

---

"<div class=\"reactable html-widget html-fill-item-overflow-hidden html-fill-item\" data-react-ssr id=\"stable-id-formatting-intl-polyfills\" style=\"width:auto;height:auto;\"><div class=\"Reactable ReactTable\"><div class=\"rt-table\" role=\"table\"><div class=\"rt-thead\" role=\"rowgroup\" style=\"min-width:900px\"><div class=\"rt-tr rt-tr-header\" role=\"row\" style=\"flex:1 0 auto;min-width:900px\"><div class=\"rt-th rt-align-left\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort str\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><div class=\"rt-text-content\">str<\/div><span class=\"rt-sort-right\" aria-hidden=\"true\"><\/span><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort pct\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">pct<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort pct_digits\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">pct_digits<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort currency_USD\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">currency_USD<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort currency_EUR\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">currency_EUR<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-left\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort date\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><div class=\"rt-text-content\">date<\/div><span class=\"rt-sort-right\" aria-hidden=\"true\"><\/span><\/div><\/div><\/div><div class=\"rt-th rt-align-left\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort time\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><div class=\"rt-text-content\">time<\/div><span class=\"rt-sort-right\" aria-hidden=\"true\"><\/span><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort num\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">num<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort locale_hi_IN\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">locale_hi_IN<\/div><\/div><\/div><\/div><\/div><\/div><div class=\"rt-tbody\" role=\"rowgroup\" style=\"min-width:900px\"><div class=\"rt-tr-group\"><div class=\"rt-tr\" role=\"row\" style=\"flex:1 0 auto;min-width:900px\"><div class=\"rt-td rt-align-left\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">pre_str_suffix<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">75%<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">52.9%<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">$10.00<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">€11.12<\/div><\/div><div class=\"rt-td rt-align-left\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">_date_replaced_date_<\/div><\/div><div class=\"rt-td rt-align-left\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">_time_replaced_time_<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">1,234.1<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">₹1,234,567.40<\/div><\/div><\/div><\/div><div class=\"rt-no-data\" aria-live=\"assertive\"><\/div><\/div><\/div><\/div><\/div>\n<script type=\"application/json\" data-for=\"stable-id-formatting-intl-polyfills\">{\"x\":{\"tag\":{\"name\":\"Reactable\",\"attribs\":{\"data\":{\"str\":[\"str\"],\"pct\":[0.75],\"pct_digits\":[0.52900000000000003],\"currency_USD\":[10],\"currency_EUR\":[11.122999999999999],\"date\":[\"2019-05-06T03:22:15Z\"],\"time\":[\"2019-05-06T03:22:15Z\"],\"num\":[1234.1233999999999],\"locale_hi_IN\":[1234567.3999999999]},\"columns\":[{\"id\":\"str\",\"name\":\"str\",\"type\":\"character\",\"format\":{\"cell\":{\"prefix\":\"pre_\",\"suffix\":\"_suffix\"},\"aggregated\":{\"prefix\":\"pre_\",\"suffix\":\"_suffix\"}}},{\"id\":\"pct\",\"name\":\"pct\",\"type\":\"numeric\",\"format\":{\"cell\":{\"percent\":true},\"aggregated\":{\"percent\":true}}},{\"id\":\"pct_digits\",\"name\":\"pct_digits\",\"type\":\"numeric\",\"format\":{\"cell\":{\"percent\":true},\"aggregated\":{\"percent\":true}}},{\"id\":\"currency_USD\",\"name\":\"currency_USD\",\"type\":\"numeric\",\"format\":{\"cell\":{\"currency\":\"USD\"},\"aggregated\":{\"currency\":\"USD\"}}},{\"id\":\"currency_EUR\",\"name\":\"currency_EUR\",\"type\":\"numeric\",\"format\":{\"cell\":{\"currency\":\"EUR\"},\"aggregated\":{\"currency\":\"EUR\"}}},{\"id\":\"date\",\"name\":\"date\",\"type\":\"Date\",\"format\":{\"cell\":{\"prefix\":\"_date_\",\"suffix\":\"_date_\",\"datetime\":true},\"aggregated\":{\"prefix\":\"_date_\",\"suffix\":\"_date_\",\"datetime\":true}}},{\"id\":\"time\",\"name\":\"time\",\"type\":\"Date\",\"format\":{\"cell\":{\"prefix\":\"_time_\",\"suffix\":\"_time_\",\"time\":true},\"aggregated\":{\"prefix\":\"_time_\",\"suffix\":\"_time_\",\"time\":true}}},{\"id\":\"num\",\"name\":\"num\",\"type\":\"numeric\",\"format\":{\"cell\":{\"digits\":1,\"separators\":true},\"aggregated\":{\"digits\":1,\"separators\":true}}},{\"id\":\"locale_hi_IN\",\"name\":\"locale_hi_IN\",\"type\":\"numeric\",\"format\":{\"cell\":{\"separators\":true,\"currency\":\"INR\",\"locales\":\"hi-IN\"},\"aggregated\":{\"separators\":true,\"currency\":\"INR\",\"locales\":\"hi-IN\"}}}],\"elementId\":\"stable-id-formatting-intl-polyfills\",\"dataKey\":\"__predictable_data_key__\"},\"children\":[]},\"class\":\"reactR_markup\"},\"evals\":[],\"jsHooks\":[]}<\/script>"
"<div class=\"reactable html-widget html-fill-item-overflow-hidden html-fill-item\" data-react-ssr id=\"stable-id-formatting-intl-polyfills\" style=\"width:auto;height:auto;\"><div class=\"Reactable ReactTable\"><div class=\"rt-table\" role=\"table\"><div class=\"rt-thead\" role=\"rowgroup\" style=\"min-width:900px\"><div class=\"rt-tr rt-tr-header\" role=\"row\" style=\"flex:1 0 auto;min-width:900px\"><div class=\"rt-th rt-align-left\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort str\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><div class=\"rt-text-content\">str<\/div><span class=\"rt-sort-right\" aria-hidden=\"true\"><\/span><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort pct\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">pct<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort pct_digits\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">pct_digits<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort currency_USD\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">currency_USD<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort currency_EUR\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">currency_EUR<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-left\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort date\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><div class=\"rt-text-content\">date<\/div><span class=\"rt-sort-right\" aria-hidden=\"true\"><\/span><\/div><\/div><\/div><div class=\"rt-th rt-align-left\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort time\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><div class=\"rt-text-content\">time<\/div><span class=\"rt-sort-right\" aria-hidden=\"true\"><\/span><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort num\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">num<\/div><\/div><\/div><\/div><div class=\"rt-th rt-align-right\" role=\"columnheader\" style=\"position:relative;flex:100 0 auto;min-width:100px;width:100px\" aria-label=\"Sort locale_hi_IN\" aria-sort=\"none\" tabindex=\"0\" data-sort-hint=\"ascending\"><div class=\"rt-th-inner\"><div class=\"rt-sort-header\"><span class=\"rt-sort-left\" aria-hidden=\"true\"><\/span><div class=\"rt-text-content\">locale_hi_IN<\/div><\/div><\/div><\/div><\/div><\/div><div class=\"rt-tbody\" role=\"rowgroup\" style=\"min-width:900px\"><div class=\"rt-tr-group\"><div class=\"rt-tr\" role=\"row\" style=\"flex:1 0 auto;min-width:900px\"><div class=\"rt-td rt-align-left\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">pre_str_suffix<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">75%<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">52.9%<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">$10.00<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">€11.12<\/div><\/div><div class=\"rt-td rt-align-left\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">_date_replaced_date_<\/div><\/div><div class=\"rt-td rt-align-left\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">_time_replaced_time_<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">1,234.1<\/div><\/div><div class=\"rt-td rt-align-right\" role=\"cell\" style=\"flex:100 0 auto;min-width:100px;width:100px\"><div class=\"rt-td-inner\">₹1,234,567.40<\/div><\/div><\/div><\/div><div class=\"rt-no-data\" aria-live=\"assertive\"><\/div><\/div><\/div><\/div><\/div>\n<script type=\"application/json\" data-for=\"stable-id-formatting-intl-polyfills\">{\"x\":{\"tag\":{\"name\":\"Reactable\",\"attribs\":{\"data\":{\"str\":[\"str\"],\"pct\":[0.75],\"pct_digits\":[0.529],\"currency_USD\":[10],\"currency_EUR\":[11.123],\"date\":[\"2019-05-06T03:22:15Z\"],\"time\":[\"2019-05-06T03:22:15Z\"],\"num\":[1234.1234],\"locale_hi_IN\":[1234567.4]},\"columns\":[{\"id\":\"str\",\"name\":\"str\",\"type\":\"character\",\"format\":{\"cell\":{\"prefix\":\"pre_\",\"suffix\":\"_suffix\"},\"aggregated\":{\"prefix\":\"pre_\",\"suffix\":\"_suffix\"}}},{\"id\":\"pct\",\"name\":\"pct\",\"type\":\"numeric\",\"format\":{\"cell\":{\"percent\":true},\"aggregated\":{\"percent\":true}}},{\"id\":\"pct_digits\",\"name\":\"pct_digits\",\"type\":\"numeric\",\"format\":{\"cell\":{\"percent\":true},\"aggregated\":{\"percent\":true}}},{\"id\":\"currency_USD\",\"name\":\"currency_USD\",\"type\":\"numeric\",\"format\":{\"cell\":{\"currency\":\"USD\"},\"aggregated\":{\"currency\":\"USD\"}}},{\"id\":\"currency_EUR\",\"name\":\"currency_EUR\",\"type\":\"numeric\",\"format\":{\"cell\":{\"currency\":\"EUR\"},\"aggregated\":{\"currency\":\"EUR\"}}},{\"id\":\"date\",\"name\":\"date\",\"type\":\"Date\",\"format\":{\"cell\":{\"prefix\":\"_date_\",\"suffix\":\"_date_\",\"datetime\":true},\"aggregated\":{\"prefix\":\"_date_\",\"suffix\":\"_date_\",\"datetime\":true}}},{\"id\":\"time\",\"name\":\"time\",\"type\":\"Date\",\"format\":{\"cell\":{\"prefix\":\"_time_\",\"suffix\":\"_time_\",\"time\":true},\"aggregated\":{\"prefix\":\"_time_\",\"suffix\":\"_time_\",\"time\":true}}},{\"id\":\"num\",\"name\":\"num\",\"type\":\"numeric\",\"format\":{\"cell\":{\"digits\":1,\"separators\":true},\"aggregated\":{\"digits\":1,\"separators\":true}}},{\"id\":\"locale_hi_IN\",\"name\":\"locale_hi_IN\",\"type\":\"numeric\",\"format\":{\"cell\":{\"separators\":true,\"currency\":\"INR\",\"locales\":\"hi-IN\"},\"aggregated\":{\"separators\":true,\"currency\":\"INR\",\"locales\":\"hi-IN\"}}}],\"elementId\":\"stable-id-formatting-intl-polyfills\",\"dataKey\":\"__predictable_data_key__\"},\"children\":[]},\"class\":\"reactR_markup\"},\"evals\":[],\"jsHooks\":[]}<\/script>"

---

Expand Down

0 comments on commit 86bd276

Please sign in to comment.