Skip to content

Commit

Permalink
clean up two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmakesgames committed Oct 4, 2024
1 parent 4d56be3 commit 6b9265b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/mini_racer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,14 @@ def test_it_can_stop
end

def test_it_can_timeout_during_serialization
context = MiniRacer::Context.new(timeout: 500)
context = MiniRacer::Context.new(timeout: 20)

assert_raises(MiniRacer::ScriptTerminatedError) do
context.eval 'var a = {get a(){ while(true); }}; a'
end
end

def test_it_can_automatically_time_out_context
# 2 millisecs is a very short timeout but we don't want test running forever
def test_it_can_time_out_js_eval
context = MiniRacer::Context.new(timeout: 2)
assert_raises do
context.eval('while(true){}')
Expand Down

0 comments on commit 6b9265b

Please sign in to comment.