Test for tern in addons

Fix #1367