added $JS.define unit tests