Project: titanium
Issue TIMOB-18327: Windows: Ti.UI.createXX should return an Object, not a Function
Noticed that `Ti.UI.createXXX` function returns JS Function. Shouldn't it return JS Object because API doc says "Creates and returns an *instance of* XX"? It prevents from writing a unit test against object like `should(view).be.an.Object;`. How to reproduce: {code} try { var should = require('should'); var view = Ti.UI.createView(); Ti.API.info(typeof view); // <-- This prints "function" should(view).be.an.Object; // <-- This throws assertion error because view is not an object } catch (E) { Ti.API.info(E.toString()); } {code}
Story points: 8