1 |
|
/* |
2 |
|
Copyright (c) 2012, Yahoo! Inc. All rights reserved. |
3 |
|
Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. |
4 |
|
*/ |
5 |
|
|
6 |
1 |
var runWithCover = require('./common/run-with-cover'), |
7 |
|
util = require('util'), |
8 |
|
Command = require('./index'); |
9 |
|
|
10 |
1 |
function CoverCommand() { |
11 |
6 |
Command.call(this); |
12 |
|
} |
13 |
|
|
14 |
1 |
CoverCommand.TYPE = 'cover'; |
15 |
1 |
util.inherits(CoverCommand, Command); |
16 |
|
|
17 |
1 |
Command.mix(CoverCommand, { |
18 |
|
synopsis: function () { |
19 |
5 |
return "transparently adds coverage information to a node command. Saves coverage.json and reports at the end of execution"; |
20 |
|
}, |
21 |
|
|
22 |
|
usage: function () { |
23 |
2 |
runWithCover.usage(this.toolName(), this.type()); |
24 |
|
}, |
25 |
|
|
26 |
|
run: function (args) { |
27 |
|
runWithCover.run(args, this.type(), true); |
28 |
|
} |
29 |
|
}); |
30 |
|
|
31 |
|
|
32 |
1 |
module.exports = CoverCommand; |
33 |
|
|
34 |
|
|