* Update the Runner.run function.
* Update the Server.new function.
* Add new Config interface.
* Add new ConfigFile interface.
* Rename ClientConfig to ClientOptions.
This commit is contained in:
Eyal Solnik
2015-10-23 19:36:40 +03:00
parent 3191f6e008
commit 6568ce0b6f
+18 -5
View File
@@ -53,11 +53,11 @@ declare module 'karma' {
}
interface Runner {
run(options?: Config, callback?: ServerCallback): void;
run(options?: ConfigOptions|ConfigFile, callback?: ServerCallback): void;
}
interface Server extends NodeJS.EventEmitter {
new(options?: Config, callback?: ServerCallback): Server;
new(options?: ConfigOptions|ConfigFile, callback?: ServerCallback): Server;
/**
* Start the server
*/
@@ -82,8 +82,21 @@ declare module 'karma' {
interface ServerCallback {
(exitCode: number): void;
}
interface Config {
set: (config: ConfigOptions) => void;
LOG_DISABLE: string;
LOG_ERROR: string;
LOG_WARN: string;
LOG_INFO: string;
LOG_DEBUG: string;
}
interface ConfigFile {
configFile: string;
}
interface Config {
interface ConfigOptions {
/**
* @description Enable or disable watching files and executing the tests whenever one of these files changes.
* @default true
@@ -163,7 +176,7 @@ declare module 'karma' {
* </p>
*/
captureTimeout?: number;
client?: ClientConfig;
client?: ClientOptions;
/**
* @default true
* @description Enable or disable colors in the output (reporters and logs).
@@ -308,7 +321,7 @@ declare module 'karma' {
urlRoot?: string;
}
interface ClientConfig {
interface ClientOptions {
/**
* @default undefined
* @description When karma run is passed additional arguments on the command-line, they