Update karma configuration.

Commit summary:

* Set testFramework option in the `frameworks` variable.

  > In order to clear the deprecation warning, is is now necessary to define
  > the framework choice in its place.

* Add module.exports as karma now requires it.
* Fix log level definition.
* Properly use the module pattern, that way Karma behaves well.
* Set up the proper npm dependencies.