Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/karma

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/karma - npm Package Compare versions

Comparing version 3.0.7 to 4.4.0

225

karma/index.d.ts

@@ -1,2 +0,2 @@

// Type definitions for karma 3.0
// Type definitions for karma 4.4
// Project: https://github.com/karma-runner/karma, http://karma-runner.github.io

@@ -147,2 +147,84 @@ // Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>

// For documentation and intellisense list Karma browsers
/**
* Available browser launchers
* - `Chrome` - launcher requires `karma-chrome-launcher` plugin
* - `ChromeCanary` - launcher requires `karma-chrome-launcher` plugin
* - `ChromeHeadless` - launcher requires `karma-chrome-launcher` plugin
* - `PhantomJS` - launcher requires `karma-phantomjs-launcher` plugin
* - `Firefox` - launcher requires `karma-firefox-launcher` plugin
* - `Opera` - launcher requires `karma-opera-launcher` plugin
* - `IE` - launcher requires `karma-ie-launcher` plugin
* - `Safari` - launcher requires karma-safari-launcher plugin
*/
export type AutomatedBrowsers =
| 'Chrome'
| 'ChromeCanary'
| 'ChromeHeadless'
| 'PhantomJS'
| 'Firefox'
| 'Opera'
| 'IE'
| 'Safari';
export interface CustomHeaders {
/** Regular expression string to match files */
match: string;
/** HTTP header name */
name: string;
/** HTTP header value */
value: string;
}
export interface ProxyOptions {
/** The target url or path (mandatory) */
target: string;
/**
* Whether or not the proxy should override the Host header using the host from the target
* @defult false
*/
changeOrigin?: boolean;
}
/** A map of path-proxy pairs. */
export interface PathProxyPairs {
[path: string]: string | ProxyOptions;
}
/** For use when the Karma server needs to be run behind a proxy that changes the base url, etc */
export interface UpstreamProxy {
/**
* Will be prepended to the base url when launching browsers and prepended to internal urls as loaded by the browsers
* @default '/'
*/
path?: string;
/**
* Will be used as the port when launching browsers
* @default 9875
*/
port?: number;
/**
* Will be used as the hostname when launching browsers
* @default 'localhost'
*/
hostname?: string;
/**
* Will be used as the protocol when launching browsers
* @default 'http'
*/
protocol?: string;
}
// description of inline plugins
export type PluginName = string;
// tslint:disable-next-line:ban-types support for constructor function and classes
export type ConstructorFn = Function | (new (...params: any[]) => any);
export type FactoryFn = (...params: any[]) => any;
export type ConstructorFnType = ['type', ConstructorFn];
export type FactoryFnType = ['factory', FactoryFn];
export type ValueType = ['value', any];
export type InlinePluginType = FactoryFnType | ConstructorFnType | ValueType;
export type InlinePluginDef = Record<PluginName, InlinePluginType>;
export interface ConfigOptions {

@@ -205,2 +287,7 @@ /**

/**
* Timeout for the client socket connection (in ms)
* @default 20000
*/
browserSocketTimeout?: number;
/**
* @default []

@@ -222,3 +309,3 @@ * Possible Values:

*/
browsers?: string[];
browsers?: Array<AutomatedBrowsers | string>;
/**

@@ -248,4 +335,37 @@ * @default 60000

concurrency?: number;
/**
* When true, this will append the crossorigin attribute to generated script tags,
* which enables better error reporting for JavaScript files served from a different origin
* @default true
*/
crossOriginAttribute?: boolean;
/**
* If null (default), uses karma's own context.html file.
* @default undefined
*/
customContextFile?: string;
/**
* If null (default), uses karma's own client_with_context.html file (which is used when client.runInParent set to true).
* @default undefined
*/
customClientContextFile?: string;
/**
* If null (default), uses karma's own debug.html file.
* @default undefined
*/
customDebugFile?: string;
/**
* Custom HTTP headers that will be set upon serving files by Karma's web server.
* Custom headers are useful, especially with upcoming browser features like Service Workers.
* @default undefined
*/
customHeaders?: CustomHeaders[];
customLaunchers?: { [key: string]: CustomLauncher };
/**
* When true, this will start the karma server in another process, writing no output to the console.
* The server can be stopped using the karma stop command.
* @default false
*/
detached?: boolean;
/**
* @default []

@@ -256,2 +376,19 @@ * @description List of files/patterns to exclude from loaded files.

/**
* Enable or disable failure on running empty test-suites.
* If disabled the program will return exit-code 0 and display a warning.
* @default true
*/
failOnEmptyTestSuite?: boolean;
/**
* Enable or disable failure on tests deliberately disabled, eg fit() or xit() tests in jasmine.
* Use this to prevent accidental disabling tests needed to validate production.
* @default true
*/
failOnSkippedTests?: boolean;
/**
* Enable or disable failure on failing tests.
* @default true
*/
failOnFailingTestSuite?: boolean;
/**
* @default []

@@ -262,2 +399,12 @@ * @description List of files/patterns to load in the browser.

/**
* Force socket.io to use JSONP polling instead of XHR polling
* @default false
*/
forceJSONP?: boolean;
/**
* A new error message line
* @default undefined
*/
formatError?: (msg: string) => string;
/**
* @default []

@@ -274,2 +421,7 @@ * @description List of test frameworks you want to use. Typically, you will set this to ['jasmine'], ['mocha'] or ['qunit']...

/**
* Module used for Karma webserver
* @default undefined
*/
httpModule?: string;
/**
* @default {}

@@ -282,2 +434,7 @@ * @description Options object to be used by Node's https class.

/**
* Address that the server will listen on. Change to 'localhost' to only listen to the loopback, or '::' to listen on all IPv6 interfaces
* @default '0.0.0.0' or `LISTEN_ADDR`
*/
listenAddress?: string;
/**
* @default config.LOG_INFO

@@ -313,2 +470,7 @@ * Possible values:

/**
* This is the same as middleware except that these middleware will be run before karma's own middleware.
* @default []
*/
beforeMiddleware?: string[];
/**
* @default {}

@@ -318,4 +480,10 @@ * @description Redefine default mapping from file extensions to MIME-type.

*/
mime?: {[type: string]: string[]};
mime?: { [type: string]: string[] };
/**
* Socket.io pingTimeout in ms, https://socket.io/docs/server-api/#new-Server-httpServer-options.
* Very slow networks may need values up to 60000. Larger values delay discovery of deadlock in tests or browser crashes.
* @default 5000
*/
pingTimeout?: number;
/**
* @default ['karma-*']

@@ -327,3 +495,3 @@ * @description List of plugins to load. A plugin can be a string (in which case it will be required

*/
plugins?: any[];
plugins?: Array<PluginName | InlinePluginDef>;
/**

@@ -335,2 +503,7 @@ * @default 9876

/**
* How long will Karma wait for browser process to terminate before sending a SIGKILL signal
* @default 2000
*/
processKillTimeout?: number;
/**
* @default {'**\/*.coffee': 'coffee'}

@@ -366,6 +539,17 @@ * @description A map of preprocessors to use.

* @default {}
* @description A map of path-proxy pairs.
* @description A map of path-proxy pairs
* The proxy can be specified directly by the target url or path, or with an object to configure more options
*/
proxies?: { [path: string]: string };
proxies?: PathProxyPairs;
/**
* Called when requesting Proxy
* @default undefined
*/
proxyReq?: (proxyReq: any, req: any, res: any, options: object) => void;
/**
* Called when respnsing Proxy
* @default undefined
*/
proxyRes?: (proxyRes: any, req: any, res: any) => void;
/**
* @default true

@@ -400,2 +584,7 @@ * @description Whether or not Karma or any browsers should raise an error when an inavlid SSL certificate is found.

/**
* When a browser crashes, karma will try to relaunch. This defines how many times karma should relaunch a browser before giving up.
* @default 2
*/
retryLimit?: number;
/**
* @default false

@@ -415,2 +604,6 @@ * @description Continuous Integration mode.

/**
* For use when the Karma server needs to be run behind a proxy that changes the base url, etc
*/
upstreamProxy?: UpstreamProxy;
/**
* @default '/'

@@ -435,2 +628,9 @@ * @description The base url, where Karma runs.

/**
* @default false
* @description Set style display none on client elements.
* If true, Karma does not display the banner and browser list.
* Useful when using karma on component tests with screenshots
*/
clientDisplayNone?: boolean;
/**
* @default true

@@ -462,5 +662,8 @@ * @description Run the tests inside an iFrame or a new window

/** type to use when including a file */
export type FilePatternTypes = 'css' | 'html' | 'js' | 'dart' | 'module' | 'dom';
export interface FilePattern {
/**
* The pattern to use for matching. This property is mandatory.
* The pattern to use for matching.
*/

@@ -486,2 +689,10 @@ pattern: string;

/**
* Choose the type to use when including a file
* @default 'js'
* @description The type determines the mechanism for including the file.
* The css and html types create link elements; the js, dart, and module elements create script elements.
* The dom type includes the file content in the page, used, for example, to test components combining HTML and JS.
*/
type?: FilePatternTypes;
/**
* @default false

@@ -488,0 +699,0 @@ * @description Should the files be served from disk on each request by Karma's webserver?

4

karma/package.json
{
"name": "@types/karma",
"version": "3.0.7",
"version": "4.4.0",
"description": "TypeScript definitions for karma",

@@ -41,4 +41,4 @@ "license": "MIT",

},
"typesPublisherContentHash": "769d5e7bdd75649b7a908b22ec62eb5ff1844fc9ae03859b3b1b73a8456d254a",
"typesPublisherContentHash": "8a6fd97eb5d28633331d2ae01d3d7bdb51d4eab3672d60e6e49b92cd543cacbb",
"typeScriptVersion": "3.2"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 18 Feb 2020 01:06:37 GMT
* Last updated: Tue, 25 Feb 2020 00:30:06 GMT
* Dependencies: [@types/bluebird](https://npmjs.com/package/@types/bluebird), [@types/log4js](https://npmjs.com/package/@types/log4js), [@types/node](https://npmjs.com/package/@types/node)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc