mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
feat(karma-spec-reporter): type definitions for karma-spec-reporter (#42397)
- type definitions - tests Thanks!
This commit is contained in:
parent
bbf0fe82d5
commit
366bb08b3f
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
// Type definitions for karma-spec-reporter 0.0
|
||||
// Project: https://github.com/mlex/karma-spec-reporter#readme
|
||||
// Definitions by: Piotr Błażejewicz (Peter Blazejewicz) <https://github.com/peterblazejewicz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.2
|
||||
|
||||
import 'karma';
|
||||
|
||||
declare module 'karma' {
|
||||
interface ConfigOptions {
|
||||
/**
|
||||
* {@link https://github.com/mlex/karma-spec-reporter#configuration}
|
||||
*/
|
||||
specReporter?: SpecReporterOptions;
|
||||
}
|
||||
|
||||
interface SpecReporterOptions {
|
||||
/** limit number of lines logged per test */
|
||||
maxLogLines?: number;
|
||||
/** do not print error summary */
|
||||
suppressErrorSummary?: boolean;
|
||||
/** do not print information about failed tests */
|
||||
suppressFailed?: boolean;
|
||||
/** do not print information about passed tests */
|
||||
suppressPassed?: boolean;
|
||||
/** do not print information about skipped tests */
|
||||
suppressSkipped?: boolean;
|
||||
/** print the time elapsed for each spec */
|
||||
showSpecTiming?: boolean;
|
||||
/** test would finish with error when a first fail occurs */
|
||||
failFast?: boolean;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import karma = require('karma');
|
||||
|
||||
const test = (config: karma.Config) => {
|
||||
config.set({
|
||||
reporters: ['spec'],
|
||||
specReporter: {
|
||||
maxLogLines: 5,
|
||||
suppressErrorSummary: true,
|
||||
suppressFailed: false,
|
||||
suppressPassed: false,
|
||||
suppressSkipped: true,
|
||||
showSpecTiming: false,
|
||||
failFast: true,
|
||||
},
|
||||
plugins: ['karma-spec-reporter'],
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"karma-spec-reporter-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user