ibm-js / dapp

AMD-based Application Framework for building Web & Mobile applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After moving to use native promises, getting JS errors in the console from some successful unit tests.

edchat opened this issue · comments

After moving to use "requirejs-dplugins/Promise!" instead of always using lie promises, began getting JS errors in the console from some successful unit tests. Lie promises must have been hiding these errors.
These tests are seeing the errors:
multipleAndNestedViewsActivateCallsSuite1: - test multiple and nested Views activation calls

multipleAndNestedViewsActivateCallsConstraintsSuite1: testApp.showOrHideViews('contentCons,P2,P2S1,P2V2') will show P2,P2S1,P2V2

historyControllerSuite1: show hc1left2 - testApp.showOrHideViews('hc1leftParent,hc1left2' with parent and child params)

The error is an unhandled promise rejection, and it seems to be caused by code in Container.insertBefore trying to add a child of null.

Need to figure out how dapp is returning a null child, and/or there should probably be a check for null before trying to add the node in DisplayContainer.show() before calling self.addChild(value.child, value.index);