Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80629 views
1
{
2
"name": "cover",
3
"version": "0.2.9",
4
"description": "Native JavaScript code coverage",
5
"main": "index.js",
6
"directories": {
7
"bin": "bin",
8
"lib": ".",
9
"test": "test"
10
},
11
"dependencies": {
12
"cli-table": "0.0.x",
13
"underscore": "1.2.x",
14
"underscore.string": "2.0.x",
15
"which": "1.0.x"
16
},
17
"repository": {
18
"type": "git",
19
"url": "http://github.com/itay/node-cover.git"
20
},
21
"keywords": [
22
"code",
23
"coverage",
24
"esprima",
25
"cover",
26
"test"
27
],
28
"author": {
29
"name": "Itay Neeman",
30
"email": "[email protected]",
31
"url": "http://www.pretzelwisdom.com"
32
},
33
"license": "MIT/X11",
34
"engine": {
35
"node": ">=0.6"
36
},
37
"preferGlobal": "true",
38
"bin": {
39
"cover": "bin/cover"
40
},
41
"readme": "## Cover - Native JavaScript Code Coverage\n\nCover gives you the ability to collect code-coverage for your projects, using\nwhatever unit test framework you want, and all using native JavaScript. It also\ncomes bundled with pre-defined reporters, such as HTML and CLI output, so you\ncan easily see where you are missing coverage.\n\n### Standing on the shoulders of giants\n\nI would be amiss to not mention that the hard work in this library was\nby [Chris Dickinson] with his work on [runforcover]. In reality, Cover is \na fork of runforcover, fixing some of the issues and making it more usable.\n\nThe original version of Cover used [substack]'s excellent [bunker] library,\nbut it has recently been moved to using [esprima] and a new code homegrown\ninstrumentation library.\n\n### Known Issues\n\nThere are currently a few known issues that I am working on:\n\n1. If you use 'global' to pass state between modules (mocha does this, for\nexample), then you might run into issues. Cover runs modules as if they\nwere executed with `NODE_MODULE_CONTEXTS` was set.\n\n2. If you start new node processes, Cover won't work with those, as\nit instruments by hooking into `require`.\n\n### Usage\n\nUsing Cover is simple. Simply install it globally:\n\n> npm install cover -g\n\nAnd then, run it\n\n> cover run mytests.js\n\nWant to pass some arguments to your test? No problem (note the `--`):\n\n> cover run mytests.js -- --arg1 --arg2=foo\n\n Once you've run your tests, it will create a directory with coverage data in it.\n If you want to see the coverage report, simply run:\n \n > cover report\n \n which will output the report to the CLI. Want to get an HTML report?\n \n > cover report html\n \n This will create a `cover_html` directory with the coverage information.\n \n### Configuration\n\nCover reads from a `.coverrc` file in your project directory, and it comes\nwith sensible defaults. Here are the defaults that it uses:\n\n {\n \"formatter\": \"cli\",\n \"ignore\": \".coverignore\",\n \n \"prefix\": \"coveragefile_\", // Prefix for coverage data files\n \"dataDirectory\": \".coverage_data\", // Directory to put coverage files in\n \n \"debugDirectory\": \".coverage_debug\", // Directory to put instrumented files in\n \n \"modules\": false, // Whether or not to cover node_modules directory\n \n // Formatter-specific info\n \"html\" : {\n \"directory\": \"cover_html\", // Directory to write HTML files too\n \"generateIndex\": true // Whether to generate an index.html file\n },\n \n \"json\": {\n }\n }\n \nYou can also specify which files to ignore using .coverignore. Here is the one used\nfor Cover itself:\n\n node_modules\n \nYou can specify both files and directories in the `.coverignore` file.\n\nIf you have a customer path for your configuration files, you can specify this\non the command line:\n\n> cover --config path/to/config --ignore path/to/ignore run myfile.js\n\n[esprima]: http://www.esprima.org\n[substack]: https://github.com/substack\n[bunker]: https://github.com/substack/node-bunker\n[Chris Dickinson]: https://github.com/chrisdickinson\n[runforcover]: https://github.com/chrisdickinson/node-runforcover",
42
"readmeFilename": "README.markdown",
43
"_id": "[email protected]",
44
"dist": {
45
"shasum": "262029dfb31714d48043fed91ede658593955dd4",
46
"tarball": "http://registry.npmjs.org/cover/-/cover-0.2.9.tgz"
47
},
48
"_from": "cover@>=0.2.8 <0.3.0",
49
"_npmVersion": "1.2.11",
50
"_npmUser": {
51
"name": "itay",
52
"email": "[email protected]"
53
},
54
"maintainers": [
55
{
56
"name": "itay",
57
"email": "[email protected]"
58
}
59
],
60
"_shasum": "262029dfb31714d48043fed91ede658593955dd4",
61
"_resolved": "https://registry.npmjs.org/cover/-/cover-0.2.9.tgz"
62
}
63
64