Skip to content

Commit

Permalink
Update the locale test with a hardcoded date
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanp authored and lloeki committed May 7, 2021
1 parent 8148e78 commit 9340611
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/mini_racer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class MiniRacerTest < Minitest::Test


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

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

Expand Down

0 comments on commit 9340611

Please sign in to comment.