Added widget to test suite

Change-Id: I8698fd2cabc788b275d9fbb2b5af2a2e0742e9c0
diff --git a/dev/js/src/plugin/widget.js b/dev/js/src/plugin/widget.js
index dbdeee9..b8aa49e 100644
--- a/dev/js/src/plugin/widget.js
+++ b/dev/js/src/plugin/widget.js
@@ -22,6 +22,8 @@
 
     // Initialize widget
     _init : function (name, src, id) {
+      if (!name || !src || !id)
+        throw Error("Widget not well defined");
       this.name = name;
       this.src = src;
       this.id = id;