1
0
Fork 0
mirror of https://github.com/rubyjs/mini_racer synced 2023-03-27 23:21:28 -04:00
This commit is contained in:
Dimitris Theodorou 2018-10-15 12:09:01 +03:00
parent 419142a948
commit 058052d5e7

View file

@ -373,9 +373,14 @@ raise FooError, "I like foos"
end
def test_invalid_snapshots_throw_an_exception
assert_raises(MiniRacer::SnapshotError) do
begin
MiniRacer::Snapshot.new('var foo = bar;')
rescue MiniRacer::SnapshotError => e
assert(e.backtrace[0].include? 'JavaScript')
got_error = true
end
assert(got_error, "should raise")
end
def test_an_empty_snapshot_is_valid