Skip to content

Commit

Permalink
DEV: add a locale test to ensure ICU works
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Apr 28, 2021
1 parent 06cca5b commit 90edfa1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/mini_racer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ class MiniRacerTest < Minitest::Test
# see `test_platform_set_flags_works` below
MiniRacer::Platform.set_flags! :use_strict


def test_locale
val = MiniRacer::Context.new.eval("new Date().toLocaleDateString('es-MX');")
assert_equal '28/4/2021', val

val = MiniRacer::Context.new.eval("new Date().toLocaleDateString('en-US');")
assert_equal '4/28/2021', val
end

def test_segfault
skip "running this test is very slow"
# 5000.times do
Expand Down

0 comments on commit 90edfa1

Please sign in to comment.