CARVIEW |
Select Language
HTTP/2 200
server: GitHub.com
content-type: text/html; charset=utf-8
last-modified: Mon, 29 Jul 2024 17:43:22 GMT
access-control-allow-origin: *
etag: W/"66a7d4ba-2715"
expires: Fri, 10 Oct 2025 11:18:59 GMT
cache-control: max-age=600
content-encoding: gzip
x-proxy-cache: MISS
x-github-request-id: C672:C0BFA:16D3A2:1B04A9:68E8E948
accept-ranges: bytes
age: 0
date: Fri, 10 Oct 2025 11:08:59 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210070-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760094540.523541,VS0,VE313
vary: Accept-Encoding
x-fastly-request-id: fba7750335d47b3b4440bdada65201609c4fcdd3
content-length: 2601
Karma - Public Api
Heads Up! You're viewing the docs for v0.12, an old version of Karma.
v6.4 is the newest.
Public Api
Most of the time, you will be using Karma directly from the command line. You can, however, call Karma programmatically from your node module. Here is the public API.
karma.server #
server.start(options, [callback=process.exit]) #
Equivalent of karma start
.
var server = require('karma').server;
server.start({port: 9876}, function(exitCode) {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});
karma.runner #
runner.run(options, [callback=process.exit]) #
Equivalent of karma run
.
var runner = require('karma').runner;
runner.run({port: 9876}, function(exitCode) {
console.log('Karma has exited with ' + exitCode);
process.exit(exitCode);
});