Ad
  • Custom User Avatar

    The kata is stuck at Node 8.

  • Custom User Avatar

    Design issue: Angular is already predefined and the tests expect the dependency graph to be cleared after angular.bootstrap for test reuse. But angular.bootstrap can only be used once anyway, so the kata is definitely not adhering to AngularJS standards.

    It should also be argued that Angular should be a class defined by the user, not in Preloaded, so we're not coming with our weird ways to keep track of dependencies in other global variables, and clearing the dependency graph by timing where one part of the test ends.

    (Speaking of which, currently when angular.module is called with dependencies it overwrites the existing dependency graph before doing validation. This is very unexpected; vaildation failure should not change the state of an object.)

  • Custom User Avatar

    The order of the dependencies in modules array after bootstrap is not specified.

  • Default User Avatar

    Good kata with one very minor issue - the "Angular" constructor is locked, which makes it confusing to try to add a new property (for tracking dependencies). It is easy to workaround but may be worth mentioning in the description.

  • Custom User Avatar
  • Default User Avatar

    Good point! I have added that requirement. Thanks!

  • Custom User Avatar

    I think the tests should require a module to be added prior to bootstrap. It seems wrong that you can depend on a module that hasn't been added before bootstrapping.

    The case in question is should bind profile to app, where a module is never defined but is depended on. Seems like the code should error on bootstrap in this case.

  • Default User Avatar

    Indeed this was intended, as pointed out in the description, a module can be defined once with the dependencies array, but can be used after without them to create other components. The test is trying to show the difference between:

    angular.module('app', [])

    and

    angular.module('app').controller(function(){})

    without overcomplicating things.

  • Default User Avatar

    Fixed, thanks for the catch

  • Custom User Avatar

    The tests are not correct. Two times adding same module should throw an error, but inside the initial tests you are using that:
    it('should be possible to use the module after creation', function(){
    angular.module('app', []);
    angular.module('app');

      angular.bootstrap('app');
    
  • Custom User Avatar

    The tests and the initial solution are not working.
    Inside the tests you are creating an instance from "Angular" and inside the initial solution you define methods of "angular".

  • Default User Avatar
  • Custom User Avatar

    Nice job: well commented, efficient, mantainable... Bravo!

  • Default User Avatar

    Nice Kata!

    translation to JS ready :)

  • Custom User Avatar

    Ops, rectius: the last regex was /[A-Z][a-z]?/, pardon.

  • Loading more items...