Add tests for widgets JavaScript

Clean up test runner by removing nonexistant spec and removing
unnecessary "type='text/javascript'" attributes from script elements.

Fix export of widgets object.

Addresses #741