@types/karma-coverage
Advanced tools
Comparing version 1.1.2 to 2.0.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for karma-coverage 1.1 | ||
// Type definitions for karma-coverage 2.0 | ||
// Project: https://github.com/karma-runner/karma-coverage | ||
@@ -7,8 +7,7 @@ // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 3.2 | ||
import 'karma'; | ||
import * as istanbul from 'istanbul'; | ||
import "karma"; | ||
import { Store } from "istanbul"; | ||
declare module 'karma' { | ||
declare module "karma" { | ||
interface ConfigOptions { | ||
@@ -22,16 +21,17 @@ /** | ||
/** Reporter type */ | ||
export type ReporterType = 'html' | | ||
'lcov' | | ||
'lcovonly' | | ||
'text' | | ||
'text-summary' | | ||
'cobertura' | | ||
'teamcity' | | ||
'json' | | ||
'json-summary' | | ||
'in-memory' | | ||
'none'; | ||
type ReporterType = | ||
| "html" | ||
| "lcov" | ||
| "lcovonly" | ||
| "text" | ||
| "text-summary" | ||
| "cobertura" | ||
| "teamcity" | ||
| "json" | ||
| "json-summary" | ||
| "in-memory" | ||
| "none"; | ||
interface Reporter { | ||
type: ReporterType, | ||
type: ReporterType; | ||
dir?: string; | ||
@@ -42,15 +42,41 @@ subdir?: string | ((browser: string) => string); | ||
interface CheckTresholds { | ||
global?: Tresholds; | ||
each?: Tresholds; | ||
} | ||
interface Tresholds { | ||
statements?: number; | ||
branches?: number; | ||
functions?: number; | ||
lines?: number; | ||
excludes?: string[]; | ||
overrides?: Record<string, Tresholds>; | ||
} | ||
interface Watermarks { | ||
statements?: [number, number]; | ||
functions?: [number, number]; | ||
branches?: [number, number]; | ||
lines?: [number, number]; | ||
} | ||
interface KarmaCoverageReporter { | ||
/** Specify a reporter type */ | ||
type?: ReporterType; | ||
/** This will be used to output coverage reports. When you set a relative path, the directory is resolved against the basePath. */ | ||
dir?: string; | ||
/** This will be used in complement of the coverageReporter.dir option to generate the full output directory path */ | ||
subdir?: string | ((browser: string) => string); | ||
/** If you use one of these reporters, `cobertura`, `lcovonly`, `teamcity`, `text` or `text-summary`, you may set the file option to specify the output file */ | ||
file?: string; | ||
/** This will be used to configure minimum threshold enforcement for coverage results */ | ||
check?: any; | ||
check?: CheckTresholds; | ||
/** This will be used to set the coverage threshold colors */ | ||
watermarks?: any; | ||
watermarks?: Watermarks; | ||
/** | ||
@@ -61,4 +87,6 @@ * You can opt to include all sources files, as indicated by the coverage preprocessor, | ||
includeAllSources?: boolean; | ||
/** You can opt to specify a source store allowing for external coverage collectors access to the instrumented code. */ | ||
sourceStore?: istanbul.Store; | ||
sourceStore?: Store; | ||
/** You can use multiple reporters, by providing array of options */ | ||
@@ -71,3 +99,10 @@ reporters?: Reporter[]; | ||
*/ | ||
instrumenter?: any; | ||
instrumenter?: { | ||
[key: string]: string; | ||
}; | ||
instrumenters?: Record<string, any>; | ||
instrumenterOptions?: Record<string, Record<string, unknown>>; | ||
/** | ||
@@ -79,4 +114,5 @@ * If set to true, then CoffeeScript files instrumented with Ibrik will use | ||
useJSExtensionForCoffeeScript?: boolean; | ||
[moreSettings: string]: any; | ||
[moreSettings: string]: unknown; | ||
} | ||
} |
{ | ||
"name": "@types/karma-coverage", | ||
"version": "1.1.2", | ||
"version": "2.0.0", | ||
"description": "TypeScript definitions for karma-coverage", | ||
@@ -35,4 +35,4 @@ "license": "MIT", | ||
}, | ||
"typesPublisherContentHash": "4909602de2c783c1b08ebdb2f6530569bffdb51069c7b27e26fc8da219306d3d", | ||
"typeScriptVersion": "3.2" | ||
"typesPublisherContentHash": "1457f748fefd3c829a297d50c8b8302a37b7a2fa0031ec413c2c5bfd65b78952", | ||
"typeScriptVersion": "3.5" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 27 Jan 2020 18:57:41 GMT | ||
* Last updated: Thu, 25 Mar 2021 20:31:59 GMT | ||
* Dependencies: [@types/karma](https://npmjs.com/package/@types/karma), [@types/istanbul](https://npmjs.com/package/@types/istanbul) | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Tanguy Krotoff (https://github.com/tkrotoff), Yaroslav Admin (https://github.com/devoto13), and Piotr Błażejewicz (https://github.com/peterblazejewicz). | ||
These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff), [Yaroslav Admin](https://github.com/devoto13), and [Piotr Błażejewicz](https://github.com/peterblazejewicz). |
Sorry, the diff of this file is not supported yet
6794
93