feat(karma-jasmine-spec-tags): new types defintion for v1.2 (#43051)

- definition file
- tests

https://github.com/mnasyrov/karma-jasmine-spec-tags#readme

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz) 2020-03-27 18:09:38 +01:00 committed by GitHub
parent 4fce93531e
commit 631ce47c56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 93 additions and 0 deletions

View File

@ -0,0 +1,34 @@
// Type definitions for karma-jasmine-spec-tags 1.2
// Project: https://github.com/mnasyrov/karma-jasmine-spec-tags#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';
// A plugin for karma-jasmine which helps to filter tests (specs) by tags.
declare module 'karma' {
/**
* Default values can be configured using client map in Karma configuration
*/
interface ClientOptions {
/**
* defines a prefix for a tag name
* @default '#'
*/
tagPrefix?: string;
/**
* defines a comma-separated list of tag names:
* * if `names` is defined then specs which match to tags will be executed.
* * If `names` is not defined then all specs with a tag will be executed.
*/
tags?: string | string[] | boolean;
/**
* defines a comma-separated list of tag names
* * If `names` is defined then specs which match to tags will be skipped.
* * If `names` is not defined then all specs with a tag will be skipped.
*/
skipTags?: string | string[] | boolean;
}
}

View File

@ -0,0 +1,35 @@
import karma = require('karma');
module.exports = (config: karma.Config) => {
config.set({
frameworks: ['jasmine', 'jasmine-spec-tags'],
client: {
tagPrefix: '@',
tags: 'smoke',
skipTags: 'slow',
},
});
};
module.exports = (config: karma.Config) => {
config.set({
frameworks: ['jasmine', 'jasmine-spec-tags'],
client: {
tags: ['smoke'],
skipTags: ['slow'],
},
});
};
module.exports = (config: karma.Config) => {
config.set({
frameworks: ['jasmine', 'jasmine-spec-tags'],
client: {
tags: false,
skipTags: true,
},
});
};

View File

@ -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-jasmine-spec-tags-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }