Skip to content

Commit 75ae765

Browse files
committed
Add tests of unsupported function name
From Temml v0.13.01, unsupported function name causes exception if throwOnError is true.
1 parent f4d341e commit 75ae765

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/temml_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@
2626
it 'throw exception on error (or not)' do
2727
expect { Temml.render('e^{i\pi') }.to raise_error(ExecJS::ProgramError)
2828
expect { Temml.render('e^{i\pi', throwOnError: false) }.not_to raise_error
29+
expect { Temml.render('\UnsupportedFunctionNameLikeThat') }.to raise_error(ExecJS::ProgramError)
30+
expect { Temml.render('\UnsupportedFunctionNameLikeThat', throwOnError: false) }.not_to raise_error
2931
end
3032
end

0 commit comments

Comments
 (0)