mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-29 17:07:07 +08:00
karma: Add typings for 'middleware' in ConfigOptions (#26882)
Karma config accepts a list of middleware as documented here: http://karma-runner.github.io/2.0/config/configuration-file.html
This commit is contained in:
committed by
Mohamed Hegazy
parent
bc4d86eeab
commit
48d3739bf3
12
types/karma/index.d.ts
vendored
12
types/karma/index.d.ts
vendored
@@ -294,6 +294,18 @@ declare namespace karma {
|
||||
* @description A list of log appenders to be used. See the documentation for [log4js] for more information.
|
||||
*/
|
||||
loggers?: Log4jsAppenderConfigBase[];
|
||||
/**
|
||||
* @default []
|
||||
* @description List of names of additional middleware you want the
|
||||
* Karma server to use. Middleware will be used in the order listed.
|
||||
* You must have installed the middleware via a plugin/framework
|
||||
* (either inline or via NPM). Additional information can be found in
|
||||
* [plugins](http://karma-runner.github.io/2.0/config/plugins.html).
|
||||
* The plugin must provide an express/connect middleware function
|
||||
* (details about this can be found in the
|
||||
* [Express](http://expressjs.com/guide/using-middleware.html) docs).
|
||||
*/
|
||||
middleware?: string[];
|
||||
/**
|
||||
* @default {}
|
||||
* @description Redefine default mapping from file extensions to MIME-type.
|
||||
|
||||
@@ -88,6 +88,8 @@ module.exports = function(config: karma.Config) {
|
||||
'coverage'
|
||||
],
|
||||
|
||||
middleware: ['foo', 'bar'],
|
||||
|
||||
mime: {
|
||||
'text/x-typescript': ['ts', 'tsx']
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user