mirror of
https://github.com/rubyjs/mini_racer
synced 2023-03-27 23:21:28 -04:00
add test
This commit is contained in:
parent
419142a948
commit
058052d5e7
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue