Skip to content

Commit

Permalink
Handle cyclic references in packages required in the Karma config, #157
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbarke committed Aug 10, 2017
1 parent 7942e33 commit 62288ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/karma/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
var Framework = (function () {
function Framework(bundler, config, resolver) {
var _this = this;
this.stringify = require("json-stringify-safe");
this.create = function (karmaConfig, logger) {
_this.log = logger.create("framework.karma-typescript");
config.initialize(karmaConfig);
Expand All @@ -18,7 +19,7 @@ var Framework = (function () {
});
}
});
_this.log.debug("Configuration:\n", JSON.stringify(config, _this.replacer, 3));
_this.log.debug("Configuration:\n", _this.stringify(config, _this.replacer, 3));
};
this.create.$inject = ["config", "logger"];
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"ieee754": "^1.1.8",
"isarray": "^1.0.0",
"istanbul": "0.4.5",
"json-stringify-safe": "^5.0.1",
"karma-coverage": "^1.1.1",
"lodash": "^4.17.4",
"log4js": "^1.1.1",
Expand Down
3 changes: 2 additions & 1 deletion src/karma/framework.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export class Framework {

public create: { (karmaConfig: ConfigOptions, helper: any, logger: any): void };
private log: Logger;
private stringify = require("json-stringify-safe");

constructor(bundler: Bundler, config: Configuration, resolver: Resolver) {

Expand All @@ -31,7 +32,7 @@ export class Framework {
}
});

this.log.debug("Configuration:\n", JSON.stringify(config, this.replacer, 3));
this.log.debug("Configuration:\n", this.stringify(config, this.replacer, 3));
};

(<any> this.create).$inject = ["config", "logger"];
Expand Down

0 comments on commit 62288ae

Please sign in to comment.