upgraded to karma test runner
Added tests for children property argument
Allow children property to be a function providing a getter for the children array