mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
fix(karma): missing browserConsoleLogOptions configuration option (#42393)
- definition amended - test updated Thanks!
This commit is contained in:
parent
5fa54b55ee
commit
a11e1e2095
Vendored
+20
@@ -3,6 +3,7 @@
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// James Garbutt <https://github.com/43081j>
|
||||
// Yaroslav Admin <https://github.com/devoto13>
|
||||
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.2
|
||||
|
||||
@@ -164,6 +165,10 @@ export interface ConfigOptions {
|
||||
* the <code>__dirname</code> of the configuration file.
|
||||
*/
|
||||
basePath?: string;
|
||||
/**
|
||||
* Configure how the browser console is logged with the following properties, all of which are optional
|
||||
*/
|
||||
browserConsoleLogOptions?: BrowserConsoleLogOptions;
|
||||
/**
|
||||
* @default 2000
|
||||
* @description How long does Karma wait for a browser to reconnect (in ms).
|
||||
@@ -474,6 +479,21 @@ export interface CustomLauncher {
|
||||
platform?: string;
|
||||
}
|
||||
|
||||
export interface BrowserConsoleLogOptions {
|
||||
/** the desired log-level, where level log always is logged */
|
||||
level?: 'log' | 'error' | 'warn' | 'info' | 'debug';
|
||||
/**
|
||||
* The format is a string where `%b`, `%t`, `%T`, and `%m` are replaced with the browser string,
|
||||
* log type in lower-case, log type in uppercase, and log message, respectively.
|
||||
* This format will only effect the output file
|
||||
*/
|
||||
format?: string;
|
||||
/** output-path of the output-file */
|
||||
path?: string;
|
||||
/** if the log should be written in the terminal, or not */
|
||||
terminal?: boolean;
|
||||
}
|
||||
|
||||
export namespace config {
|
||||
function parseConfig(configFilePath: string, cliOptions: ConfigOptions): Config;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,13 @@ module.exports = (config: karma.Config) => {
|
||||
},
|
||||
|
||||
singleRun: true,
|
||||
restartOnFileChange: true
|
||||
restartOnFileChange: true,
|
||||
browserConsoleLogOptions: {
|
||||
level: 'warn',
|
||||
format: '%b %T: %m',
|
||||
path: 'some/path/to.log',
|
||||
terminal: false,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user