When the X-Icinga-Module-Enable header is send, the
modulemanager automatically tries to load javascript files for
that module. This is realized by adding the 'registerHeaderListener'
method to the async manager, which allows to listen to specific headers
and firing callbacks if a response with the specified header is retrieved.
Also the tests have changed a bit, requireNow should be used when using
the requiremock, so a require always loads files new.
refs #4092
refs #3753
The getDefine method check's for existence of the 'arg' variable,
which was renamed to 'name', causing the typeof arg === "undefined"
to always return true
refs #4308
Tests can now call require('requiremock') to bootstrap an alternative
requirejs implementation and use the resulting object for defining
dependencies and mocks
refs #4308