mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #22246 from 43081j/karma-options
add karma client options
This commit is contained in:
Vendored
+14
@@ -1,6 +1,7 @@
|
||||
// Type definitions for karma 1.7
|
||||
// Project: https://github.com/karma-runner/karma
|
||||
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
|
||||
// James Garbutt <https://github.com/43081j>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -414,6 +415,19 @@ declare namespace karma {
|
||||
* @description Capture all console output and pipe it to the terminal.
|
||||
*/
|
||||
captureConsole?: boolean;
|
||||
/**
|
||||
* @default false
|
||||
* @description Run the tests on the same window as the client, without using iframe or a new window
|
||||
*/
|
||||
runInParent?: boolean;
|
||||
/**
|
||||
* @default true
|
||||
* @description Clear the context window
|
||||
* If true, Karma clears the context window upon the completion of running the tests.
|
||||
* If false, Karma does not clear the context window upon the completion of running the tests.
|
||||
* Setting this to false is useful when embedding a Jasmine Spec Runner Template.
|
||||
*/
|
||||
clearContext?: boolean;
|
||||
}
|
||||
|
||||
interface FilePattern {
|
||||
|
||||
@@ -51,7 +51,7 @@ server.on('run_complete', (browsers, results) => {
|
||||
results.error = false;
|
||||
results.exitCode = 0;
|
||||
results.failed = 9;
|
||||
results.success = 10;
|
||||
results.success = 10;
|
||||
});
|
||||
|
||||
//var runner = require('karma').runner; => cannot use this syntax otherwise runner is of type any
|
||||
@@ -108,3 +108,15 @@ module.exports = function(config: karma.Config) {
|
||||
singleRun: true
|
||||
});
|
||||
};
|
||||
|
||||
const foo = (config: karma.Config) => {
|
||||
config.set({
|
||||
client: {
|
||||
args: ['a', 'b'],
|
||||
useIframe: true,
|
||||
runInParent: true,
|
||||
captureConsole: true,
|
||||
clearContext: true
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user