├── .codeclimate.yml ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .travis.yml ├── LICENSE.txt ├── README.md ├── bin └── codeclimate.js ├── ci_info.js ├── formatter.js ├── git_info.js ├── gocover_parse.js ├── http_client.js ├── package-lock.json ├── package.json └── test ├── fixtures ├── cover.out └── lcov.info └── test.js /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | engines: 3 | duplication: 4 | enabled: true 5 | config: 6 | languages: 7 | - javascript 8 | eslint: 9 | enabled: true 10 | fixme: 11 | enabled: true 12 | ratings: 13 | paths: 14 | - "**.js" 15 | exclude_paths: 16 | - node_modules/**/* 17 | - test/**/* 18 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*{.,-}min.js 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true, 4 | "mocha": true 5 | }, 6 | "rules": { 7 | "brace-style": [2, "1tbs", { "allowSingleLine": true }], 8 | "comma-dangle": [2, "never"], 9 | "comma-style": [2, "first", { exceptions: {ArrayExpression: true, ObjectExpression: true} }], 10 | "complexity": [2, 6], 11 | "curly": 2, 12 | "eqeqeq": [2, "allow-null"], 13 | "max-statements": [2, 30], 14 | "no-shadow-restricted-names": 2, 15 | "no-undef": 2, 16 | "no-use-before-define": 2, 17 | "radix": 2, 18 | "semi": 2, 19 | "space-infix-ops": 2, 20 | "strict": 0 21 | }, 22 | "globals": { 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | coverage 2 | node_modules 3 | npm-debug.log 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | addons: 4 | code_climate: 5 | repo_token: 68ddbd40159f9e23938004b7d52767f3488e976d1b77c5649b88064eff8ac06c 6 | node_js: 7 | - '0.10' 8 | - '0.12' 9 | - '4' 10 | - '5' 11 | cache: 12 | directories: 13 | - node_modules 14 | after_script: 15 | - npm install -g codeclimate-test-reporter 16 | - codeclimate-test-reporter < ./coverage/lcov.info 17 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Code Climate LLC 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # codeclimate-test-reporter - [DEPRECATED] 2 | 3 | These configuration instructions refer to a language-specific test reporter which is now deprecated in favor of our new unified test reporter client. The [new test reporter](https://docs.codeclimate.com/v1.0/docs/configuring-test-coverage) is faster, distributed as a static binary, has support for parallelized CI builds, and will receive ongoing support by the team here. The existing test reporters for Ruby, Python, PHP, and Javascript are now deprecated. 4 | 5 | [![npm version][npm-badge]][npm-url] 6 | [![Build Status][travis-badge]][travis-url] 7 | [![Coverage Status][coverage-badge]][coverage-url] 8 | [![Code Climate][codeclimate-badge]][codeclimate-url] 9 | [![Dependency Status][david-badge]][david-url] 10 | 11 | Supplies a script which accepts coverage data over standard input, formats the coverage data and sends it to [Code Climate](https://codeclimate.com). Supports [lcov](http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php) and [Go's `cover`](https://blog.golang.org/cover) formats. 12 | 13 | Code Climate - [https://codeclimate.com](https://codeclimate.com) 14 | 15 | # Important FYIs 16 | 17 | Across the many different testing frameworks, setups, and environments, there are lots of variables at play. Before setting up test coverage, it's important to understand what we do and do not currently support: 18 | 19 | * **Single payload:** We currently only support a single test coverage payload per commit. If you run your tests in multiple steps, or via parallel tests, Code Climate will only process the first payload that we receive. If you are using a CI, be sure to check if you are running your tests in a parallel mode. 20 | 21 | **Note:** There is one exception to this rule. We've specifically built an integration with [Solano Labs](https://www.solanolabs.com/) to support parallel tests. 22 | 23 | **Note:** If you've configured Code Climate to analyze multiple languages in the same repository (e.g., Ruby and JavaScript), we can nonetheless only process test coverage information for one of these languages. We'll process the first payload that we receive. 24 | * **Invalid File Paths:** By default, our test reporters expect your application to exist at the root of your repository. If this is not the case, the file paths in your test coverage payload will not match the file paths that Code Climate expects. 25 | 26 | ## Installation 27 | 28 | This npm package requires having a user (but not necessarily a paid account) on Code Climate, so if you don't have one the 29 | first step is to create an account at: [https://codeclimate.com](https://codeclimate.com). Then: 30 | 31 | 1. Generate coverage data in [lcov](http://ltp.sourceforge.net/coverage/lcov/geninfo.1.php) or [Go's `cover`](https://blog.golang.org/cover) format. 32 | 33 | Lcov data can be generated by a number of JavaScript code coverage tools, 34 | including [Istanbul](http://gotwarlost.github.io/istanbul) and [Lab test runner](https://github.com/hapijs/lab). 35 | 36 | Coverage for Go packages can be generated by passing the `-cover` flag to `go test`. 37 | 38 | 1. Install codeclimate's NPM package 39 | 40 | $ npm install -g codeclimate-test-reporter 41 | 42 | 1. Specifying your repo token as an environment variable, send lcov coverage data to the codeclimate npm script. 43 | 44 | For example, if your coverage data resides in a "lcov.info" file: 45 | 46 | CODECLIMATE_REPO_TOKEN=ABCD11110000000 codeclimate-test-reporter < lcov.info 47 | 48 | The `CODECLIMATE_REPO_TOKEN` value is provided after you add your repo to your 49 | Code Climate account by clicking on "Setup Test Coverage" on the right hand side of your feed. 50 | 51 | Please contact hello@codeclimate.com if you need any assistance setting this up. 52 | 53 | ## Usage 54 | 55 | ``` 56 | Usage: codeclimate [options] < 57 | 58 | Options: 59 | 60 | -h, --help output usage information 61 | -V, --version output the version number 62 | -S, --skip-cert skips verification of the chain of certificate 63 | ``` 64 | 65 | ## Troubleshooting 66 | 67 | If you're having trouble setting up or working with our test coverage feature, [see our detailed help doc](http://docs.codeclimate.com/article/220-help-im-having-trouble-with-test-coverage), which covers the most common issues encountered. 68 | 69 | ## Contributions 70 | 71 | Patches, bug fixes, feature requests, and pull requests are welcome on the 72 | GitHub page for this project: [https://github.com/codeclimate/javascript-test-reporter](https://github.com/codeclimate/javascript-test-reporter) 73 | 74 | ## Copyright 75 | 76 | See LICENSE.txt 77 | 78 | [npm-badge]: https://img.shields.io/npm/v/codeclimate-test-reporter.svg 79 | [npm-url]: https://www.npmjs.com/package/codeclimate-test-reporter 80 | [travis-badge]: https://api.travis-ci.org/codeclimate/javascript-test-reporter.svg 81 | [travis-url]: https://travis-ci.org/codeclimate/javascript-test-reporter 82 | [david-badge]: https://david-dm.org/codeclimate/javascript-test-reporter.svg 83 | [david-url]: https://david-dm.org/codeclimate/javascript-test-reporter 84 | [experimental-badge]: https://img.shields.io/badge/stability-experimental-DD5F0A.svg 85 | [experimental-url]: https://nodejs.org/api/documentation.html#documentation_stability_index 86 | [codeclimate-badge]: https://codeclimate.com/github/codeclimate/javascript-test-reporter/badges/gpa.svg 87 | [codeclimate-url]: https://codeclimate.com/github/codeclimate/javascript-test-reporter 88 | [coverage-badge]: https://codeclimate.com/github/codeclimate/javascript-test-reporter/badges/coverage.svg 89 | [coverage-url]: https://codeclimate.com/github/codeclimate/javascript-test-reporter/coverage 90 | -------------------------------------------------------------------------------- /bin/codeclimate.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var commander = require("commander"); 4 | var pkg = require("../package.json"); 5 | var Formatter = require("../formatter"); 6 | var client = require('../http_client'); 7 | 8 | commander 9 | .version(pkg.version) 10 | .usage('[options] < ') 11 | .option("-S, --skip-cert", "skips verification of the chain of certificate") 12 | .parse(process.argv); 13 | 14 | process.stdin.resume(); 15 | process.stdin.setEncoding("utf8"); 16 | 17 | var input = ""; 18 | 19 | process.stdin.on("data", function(chunk) { 20 | input += chunk; 21 | }); 22 | 23 | var repo_token = process.env.CODECLIMATE_REPO_TOKEN; 24 | 25 | if(repo_token === undefined || repo_token.trim() === "") { 26 | console.error("No CODECLIMATE_REPO_TOKEN found. A CODECLIMATE_REPO_TOKEN must be specified as an environment variable."); 27 | process.exit(1); 28 | } 29 | 30 | process.stdin.on("end", function() { 31 | var formatter = new Formatter(); 32 | 33 | formatter.format(input, function(err, json) { 34 | if (err) { 35 | console.error("A problem occurred parsing the coverage data", err); 36 | } else { 37 | if (process.env.CC_OUTPUT === "stdout") { 38 | console.log(json); 39 | } else { 40 | json['repo_token'] = repo_token; 41 | client.postJson(json, { 42 | skip_certificate: commander.skipCert 43 | }); 44 | } 45 | } 46 | }); 47 | }); 48 | -------------------------------------------------------------------------------- /ci_info.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | getInfo: function() { 3 | var env = process.env; 4 | 5 | if (env.TRAVIS) { 6 | return { 7 | name: "travis-ci", 8 | branch: env.TRAVIS_BRANCH, 9 | build_identifier: env.TRAVIS_JOB_ID, 10 | pull_request: env.TRAVIS_PULL_REQUEST 11 | }; 12 | } else if (env.CIRCLECI) { 13 | return { 14 | name: "circleci", 15 | build_identifier: env.CIRCLE_BUILD_NUM, 16 | branch: env.CIRCLE_BRANCH, 17 | commit_sha: env.CIRCLE_SHA1 18 | }; 19 | } else if (env.SEMAPHORE) { 20 | return { 21 | name: "semaphore", 22 | branch: env.BRANCH_NAME, 23 | build_identifier: env.SEMAPHORE_BUILD_NUMBER 24 | }; 25 | } else if (env.JENKINS_URL) { 26 | return { 27 | name: "jenkins", 28 | build_identifier: env.BUILD_NUMBER, 29 | build_url: env.BUILD_URL, 30 | branch: env.GIT_BRANCH, 31 | commit_sha: env.GIT_COMMIT 32 | }; 33 | } else if (env.TDDIUM) { 34 | return { 35 | name: "tddium", 36 | build_identifier: env.TDDIUM_SESSION_ID, 37 | worker_id: env.TDDIUM_TID 38 | }; 39 | } else if (env.WERCKER) { 40 | return { 41 | name: "wercker", 42 | build_identifier: env.WERCKER_BUILD_ID, 43 | build_url: env.WERCKER_BUILD_URL, 44 | branch: env.WERCKER_GIT_BRANCH, 45 | commit_sha: env.WERCKER_GIT_COMMIT 46 | }; 47 | } else if (env.CI_NAME && env.CI_NAME.match(/codeship/i)) { 48 | return { 49 | name: "codeship", 50 | build_identifier: env.CI_BUILD_NUMBER, 51 | build_url: env.CI_BUILD_URL, 52 | branch: env.CI_BRANCH, 53 | commit_sha: env.CI_COMMIT_ID 54 | }; 55 | } else if (env.APPVEYOR) { 56 | return { 57 | name: "appveyor", 58 | build_identifier: env.APPVEYOR_BUILD_NUMBER, 59 | branch: env.APPVEYOR_REPO_BRANCH, 60 | commit_sha: env.APPVEYOR_REPO_COMMIT, 61 | pull_request: env.APPVEYOR_PULL_REQUEST_NUMBER 62 | }; 63 | } else if (env.BUILDKITE) { 64 | return { 65 | name: "buildkite", 66 | build_identifier: env.BUILDKITE_BUILD_ID, 67 | build_url: env.BUILDKITE_BUILD_URL, 68 | branch: env.BUILDKITE_BRANCH, 69 | commit_sha: env.BUILDKITE_COMMIT 70 | }; 71 | } else if (env.GITLAB_CI) { 72 | return { 73 | name: "gitlab-ci", 74 | build_identifier: env.CI_BUILD_ID, 75 | branch: env.CI_BUILD_REF_NAME, 76 | commit_sha: env.CI_BUILD_REF 77 | }; 78 | } else { 79 | return {}; 80 | } 81 | } 82 | }; 83 | -------------------------------------------------------------------------------- /formatter.js: -------------------------------------------------------------------------------- 1 | var lcovParse = require('lcov-parse'); 2 | var path = require('path'); 3 | var fs = require('fs'); 4 | var pjson = require('./package.json'); 5 | var git = require("./git_info"); 6 | var ci = require("./ci_info"); 7 | var async = require("async"); 8 | var gocoverParse = require('./gocover_parse'); 9 | 10 | function Formatter(options) { 11 | this.options = options || {}; 12 | } 13 | 14 | Formatter.prototype.rootDirectory = function() { 15 | return this.options.rootDirectory || process.cwd(); 16 | }; 17 | 18 | Formatter.prototype.parse = function(data, callback) { 19 | if (/^SF:/m.test(data)) { 20 | lcovParse(data, callback); 21 | } else if (/^mode:/.test(data)) { 22 | gocoverParse(data, callback); 23 | } else { 24 | callback("Unknown input coverage format", null); 25 | } 26 | } 27 | 28 | Formatter.prototype.format = function(coverageData, callback) { 29 | var self = this; 30 | 31 | self.parse(coverageData, function(parseError, data) { 32 | if (parseError) { 33 | throw parseError; 34 | } 35 | 36 | var result = { 37 | source_files: self.sourceFiles(data), 38 | run_at: Date.now(), 39 | partial: false, 40 | environment: { 41 | pwd: process.cwd().split(path.sep).join('/'), 42 | package_version: pjson.version 43 | }, 44 | ci_service: ci.getInfo() 45 | }; 46 | async.parallel({ 47 | head: git.head, 48 | branch: git.branch, 49 | committed_at: git.committedAt 50 | }, 51 | function(err, results) { 52 | if (err) { 53 | console.error(err.message); 54 | } 55 | result.git = { 56 | head: results.head, 57 | branch: results.branch, 58 | committed_at: results.committed_at 59 | }; 60 | return callback(parseError, result); 61 | }); 62 | }); 63 | }; 64 | 65 | Formatter.prototype.sourceFiles = function(data) { 66 | var source_files = []; 67 | var self = this; 68 | data.forEach(function(elem, index) { 69 | var content; 70 | try { 71 | content = fs.readFileSync(elem.file).toString(); 72 | } catch (e) { 73 | if (e.code === 'ENOENT') { 74 | console.log('The file ' + elem.file + ' does not exist and will be skipped.'); 75 | content = ''; 76 | } else { 77 | throw e; 78 | } 79 | } 80 | var numLines = content.split("\n").size; 81 | 82 | var coverage = new Array(numLines); 83 | coverage.forEach(function(elem, index, arr) { 84 | arr[index] = null; 85 | }); 86 | elem.lines.details.forEach(function(lineDetail) { 87 | coverage[lineDetail.line - 1] = lineDetail.hit; 88 | }); 89 | 90 | var fileName = path.relative(self.rootDirectory(), elem.file); 91 | if (path.sep !== '/') { 92 | fileName = fileName.split(path.sep).join('/'); 93 | } 94 | 95 | source_files.push({ 96 | name: fileName, 97 | blob_id: git.blobId(elem.file, content), 98 | coverage: JSON.stringify(coverage) 99 | }); 100 | }); 101 | return source_files; 102 | }; 103 | 104 | module.exports = Formatter; 105 | -------------------------------------------------------------------------------- /git_info.js: -------------------------------------------------------------------------------- 1 | var crypto = require('crypto'); 2 | var childProcess = require('child_process'); 3 | 4 | function calculateBlobId(content) { 5 | var header = 'blob ' + content.length + '\0'; 6 | var store = header + content; 7 | var shasum = crypto.createHash('sha1'); 8 | shasum.update(store); 9 | return shasum.digest("hex"); 10 | } 11 | 12 | module.exports = { 13 | 14 | head: function(cb) { 15 | childProcess.exec("git log -1 --pretty=format:%H", function (error, stdout, stderr) { 16 | return cb(error, stdout); 17 | }); 18 | }, 19 | 20 | committedAt: function(cb) { 21 | childProcess.exec("git log -1 --pretty=format:%ct", function (error, stdout, stderr) { 22 | var result = null; 23 | var timestamp = null; 24 | if (stdout) { 25 | timestamp = parseInt(stdout, 10); 26 | if (!isNaN(timestamp) && timestamp !== 0) { 27 | result = timestamp; 28 | } 29 | } 30 | return cb(error, result); 31 | }); 32 | }, 33 | 34 | branch: function(cb) { 35 | childProcess.exec("git branch", function (error, stdout, stderr) { 36 | var returnBranch = null; 37 | if (stdout) { 38 | var branches = stdout.split("\n"); 39 | branches.forEach(function(val) { 40 | if(val.charAt(0) === "*") { 41 | returnBranch = val; 42 | } 43 | }); 44 | if (returnBranch) { 45 | returnBranch = returnBranch.replace("* ", ""); 46 | } 47 | } 48 | return cb(error, returnBranch); 49 | }); 50 | }, 51 | 52 | calculateBlobId: calculateBlobId, 53 | 54 | blobId: function(path, content) { 55 | var stdout, returnBlobId = null; 56 | 57 | try { 58 | stdout = childProcess.execSync("git hash-object " + path, { stdio: [0, "pipe", "ignore"] }); 59 | } catch (e) { } 60 | 61 | if (stdout) { 62 | returnBlobId = stdout.toString().trim(); 63 | } else { 64 | returnBlobId = calculateBlobId(content); 65 | } 66 | 67 | return returnBlobId; 68 | } 69 | }; 70 | -------------------------------------------------------------------------------- /gocover_parse.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = function(data, cb) { 4 | var memo = {}; 5 | var parsedData = []; 6 | 7 | var lines = data.split('\n'); 8 | 9 | // Skip mode line 10 | lines.shift(); 11 | 12 | lines.forEach(function(line) { 13 | // coverage line syntax: 14 | // Filename:.,..<# of statements>. 15 | var data = line.match(/(.*?):(\d+).\d+,(\d+).\d+ \d+ (\d+)/); 16 | if (!data) { 17 | return; 18 | } 19 | 20 | // filename is given relative to $GOPATH/src, so tack $GOPATH/src on the 21 | // front. Converting it to a relative filenae is handled by the formatter. 22 | var filename = process.env.GOPATH + '/src/' + data[1]; 23 | var startLine = data[2]; 24 | var endLine = data[3]; 25 | var hitCount = data[4]; 26 | 27 | if (!memo[filename]) { 28 | memo[filename] = { 29 | file: filename, 30 | lines: { 31 | details: [] 32 | } 33 | } 34 | parsedData.push(memo[filename]) 35 | } 36 | 37 | var lineData = memo[filename].lines; 38 | 39 | var i = startLine; 40 | for(var i = startLine; i <= endLine; i++) { 41 | lineData.details.push({ 42 | line: i*1, 43 | hit: hitCount*1 44 | }) 45 | } 46 | }); 47 | 48 | cb(null, parsedData); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /http_client.js: -------------------------------------------------------------------------------- 1 | var request = require("request"); 2 | var url = require("url"); 3 | var pjson = require('./package.json'); 4 | 5 | var host = process.env.CODECLIMATE_API_HOST || "https://codeclimate.com"; 6 | 7 | var options = { 8 | url: host + "/test_reports", 9 | method: "POST", 10 | headers: { 11 | "User-Agent": "Code Climate (JavaScript Test Reporter v" + pjson.version + ")", 12 | "Content-Type": "application/json" 13 | }, 14 | timeout: 5000 15 | }; 16 | 17 | var proxy = process.env.HTTP_PROXY || false; 18 | 19 | if (proxy) { 20 | options.proxy = proxy; 21 | } 22 | 23 | var postJson = function(data, opts) { 24 | opts = opts || {}; 25 | 26 | options.rejectUnauthorized = !opts.skip_certificate; 27 | 28 | var parts = url.parse(options.url); 29 | 30 | options.body = JSON.stringify(data); 31 | console.log("Sending test coverage results to " + parts.host + " ..."); 32 | request(options, function(error, response, body) { 33 | if (error) { 34 | if (error.code === 'UNABLE_TO_VERIFY_LEAF_SIGNATURE') { 35 | console.error( 36 | '\n' + 37 | 'It looks like you might be trying to send coverage to an\n' + 38 | 'enterprise version of CodeClimate with a (probably) invalid or\n' + 39 | 'incorrectly configured certificate chain. If you are sure about\n' + 40 | 'where you are sending your data, add the -S/--skip-cert flag and\n' + 41 | 'try again. Run with --help for more info.\n' 42 | ); 43 | } 44 | 45 | console.error("A problem occurred", error); 46 | } 47 | if (response) { 48 | if (response.statusCode >= 200 && response.statusCode < 300) { 49 | console.log("Test coverage data sent."); 50 | } else if (response.statusCode === 401) { 51 | console.log("An invalid CODECLIMATE_REPO_TOKEN repo token was specified."); 52 | } else { 53 | console.log("Status code: " + response.statusCode); 54 | } 55 | } 56 | }); 57 | 58 | }; 59 | 60 | module.exports = { postJson: postJson }; 61 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codeclimate-test-reporter", 3 | "version": "0.5.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "abbrev": { 8 | "version": "1.0.9", 9 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", 10 | "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", 11 | "dev": true 12 | }, 13 | "ajv": { 14 | "version": "5.5.2", 15 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", 16 | "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", 17 | "requires": { 18 | "co": "^4.6.0", 19 | "fast-deep-equal": "^1.0.0", 20 | "fast-json-stable-stringify": "^2.0.0", 21 | "json-schema-traverse": "^0.3.0" 22 | } 23 | }, 24 | "amdefine": { 25 | "version": "1.0.1", 26 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 27 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", 28 | "dev": true, 29 | "optional": true 30 | }, 31 | "argparse": { 32 | "version": "1.0.10", 33 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 34 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 35 | "dev": true, 36 | "requires": { 37 | "sprintf-js": "~1.0.2" 38 | } 39 | }, 40 | "asn1": { 41 | "version": "0.2.4", 42 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 43 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 44 | "requires": { 45 | "safer-buffer": "~2.1.0" 46 | } 47 | }, 48 | "assert-plus": { 49 | "version": "1.0.0", 50 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 51 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 52 | }, 53 | "async": { 54 | "version": "1.5.2", 55 | "resolved": "http://registry.npmjs.org/async/-/async-1.5.2.tgz", 56 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" 57 | }, 58 | "asynckit": { 59 | "version": "0.4.0", 60 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 61 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 62 | }, 63 | "aws-sign2": { 64 | "version": "0.7.0", 65 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 66 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 67 | }, 68 | "aws4": { 69 | "version": "1.8.0", 70 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", 71 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" 72 | }, 73 | "balanced-match": { 74 | "version": "1.0.0", 75 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 76 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 77 | "dev": true 78 | }, 79 | "bcrypt-pbkdf": { 80 | "version": "1.0.2", 81 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 82 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 83 | "optional": true, 84 | "requires": { 85 | "tweetnacl": "^0.14.3" 86 | } 87 | }, 88 | "brace-expansion": { 89 | "version": "1.1.11", 90 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 91 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 92 | "dev": true, 93 | "requires": { 94 | "balanced-match": "^1.0.0", 95 | "concat-map": "0.0.1" 96 | } 97 | }, 98 | "browser-stdout": { 99 | "version": "1.3.1", 100 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 101 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 102 | "dev": true 103 | }, 104 | "caseless": { 105 | "version": "0.12.0", 106 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 107 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 108 | }, 109 | "co": { 110 | "version": "4.6.0", 111 | "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", 112 | "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" 113 | }, 114 | "combined-stream": { 115 | "version": "1.0.7", 116 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", 117 | "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", 118 | "requires": { 119 | "delayed-stream": "~1.0.0" 120 | } 121 | }, 122 | "commander": { 123 | "version": "2.9.0", 124 | "resolved": "http://registry.npmjs.org/commander/-/commander-2.9.0.tgz", 125 | "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", 126 | "requires": { 127 | "graceful-readlink": ">= 1.0.0" 128 | } 129 | }, 130 | "concat-map": { 131 | "version": "0.0.1", 132 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 133 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 134 | "dev": true 135 | }, 136 | "core-util-is": { 137 | "version": "1.0.2", 138 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 139 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 140 | }, 141 | "dashdash": { 142 | "version": "1.14.1", 143 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 144 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 145 | "requires": { 146 | "assert-plus": "^1.0.0" 147 | } 148 | }, 149 | "debug": { 150 | "version": "3.1.0", 151 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 152 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 153 | "dev": true, 154 | "requires": { 155 | "ms": "2.0.0" 156 | } 157 | }, 158 | "deep-is": { 159 | "version": "0.1.3", 160 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 161 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 162 | "dev": true 163 | }, 164 | "delayed-stream": { 165 | "version": "1.0.0", 166 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 167 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 168 | }, 169 | "diff": { 170 | "version": "3.5.0", 171 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 172 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 173 | "dev": true 174 | }, 175 | "ecc-jsbn": { 176 | "version": "0.1.2", 177 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 178 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 179 | "optional": true, 180 | "requires": { 181 | "jsbn": "~0.1.0", 182 | "safer-buffer": "^2.1.0" 183 | } 184 | }, 185 | "escape-string-regexp": { 186 | "version": "1.0.5", 187 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 188 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 189 | "dev": true 190 | }, 191 | "escodegen": { 192 | "version": "1.8.1", 193 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", 194 | "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", 195 | "dev": true, 196 | "requires": { 197 | "esprima": "^2.7.1", 198 | "estraverse": "^1.9.1", 199 | "esutils": "^2.0.2", 200 | "optionator": "^0.8.1", 201 | "source-map": "~0.2.0" 202 | } 203 | }, 204 | "esprima": { 205 | "version": "2.7.3", 206 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", 207 | "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", 208 | "dev": true 209 | }, 210 | "estraverse": { 211 | "version": "1.9.3", 212 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", 213 | "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", 214 | "dev": true 215 | }, 216 | "esutils": { 217 | "version": "2.0.2", 218 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", 219 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", 220 | "dev": true 221 | }, 222 | "extend": { 223 | "version": "3.0.2", 224 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 225 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 226 | }, 227 | "extsprintf": { 228 | "version": "1.3.0", 229 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 230 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 231 | }, 232 | "fast-deep-equal": { 233 | "version": "1.1.0", 234 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", 235 | "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" 236 | }, 237 | "fast-json-stable-stringify": { 238 | "version": "2.0.0", 239 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 240 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 241 | }, 242 | "fast-levenshtein": { 243 | "version": "2.0.6", 244 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 245 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 246 | "dev": true 247 | }, 248 | "forever-agent": { 249 | "version": "0.6.1", 250 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 251 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 252 | }, 253 | "form-data": { 254 | "version": "2.3.2", 255 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", 256 | "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", 257 | "requires": { 258 | "asynckit": "^0.4.0", 259 | "combined-stream": "1.0.6", 260 | "mime-types": "^2.1.12" 261 | }, 262 | "dependencies": { 263 | "combined-stream": { 264 | "version": "1.0.6", 265 | "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", 266 | "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", 267 | "requires": { 268 | "delayed-stream": "~1.0.0" 269 | } 270 | } 271 | } 272 | }, 273 | "fs.realpath": { 274 | "version": "1.0.0", 275 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 276 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 277 | "dev": true 278 | }, 279 | "getpass": { 280 | "version": "0.1.7", 281 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 282 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 283 | "requires": { 284 | "assert-plus": "^1.0.0" 285 | } 286 | }, 287 | "glob": { 288 | "version": "5.0.15", 289 | "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", 290 | "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", 291 | "dev": true, 292 | "requires": { 293 | "inflight": "^1.0.4", 294 | "inherits": "2", 295 | "minimatch": "2 || 3", 296 | "once": "^1.3.0", 297 | "path-is-absolute": "^1.0.0" 298 | } 299 | }, 300 | "graceful-readlink": { 301 | "version": "1.0.1", 302 | "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", 303 | "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=" 304 | }, 305 | "growl": { 306 | "version": "1.10.5", 307 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 308 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 309 | "dev": true 310 | }, 311 | "handlebars": { 312 | "version": "4.0.12", 313 | "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", 314 | "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", 315 | "dev": true, 316 | "requires": { 317 | "async": "^2.5.0", 318 | "optimist": "^0.6.1", 319 | "source-map": "^0.6.1", 320 | "uglify-js": "^3.1.4" 321 | }, 322 | "dependencies": { 323 | "async": { 324 | "version": "2.6.1", 325 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", 326 | "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", 327 | "dev": true, 328 | "requires": { 329 | "lodash": "^4.17.10" 330 | } 331 | }, 332 | "source-map": { 333 | "version": "0.6.1", 334 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 335 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 336 | "dev": true 337 | } 338 | } 339 | }, 340 | "har-schema": { 341 | "version": "2.0.0", 342 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 343 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 344 | }, 345 | "har-validator": { 346 | "version": "5.1.0", 347 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", 348 | "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", 349 | "requires": { 350 | "ajv": "^5.3.0", 351 | "har-schema": "^2.0.0" 352 | } 353 | }, 354 | "has-flag": { 355 | "version": "1.0.0", 356 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", 357 | "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", 358 | "dev": true 359 | }, 360 | "he": { 361 | "version": "1.1.1", 362 | "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", 363 | "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", 364 | "dev": true 365 | }, 366 | "http-signature": { 367 | "version": "1.2.0", 368 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 369 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 370 | "requires": { 371 | "assert-plus": "^1.0.0", 372 | "jsprim": "^1.2.2", 373 | "sshpk": "^1.7.0" 374 | } 375 | }, 376 | "inflight": { 377 | "version": "1.0.6", 378 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 379 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 380 | "dev": true, 381 | "requires": { 382 | "once": "^1.3.0", 383 | "wrappy": "1" 384 | } 385 | }, 386 | "inherits": { 387 | "version": "2.0.3", 388 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 389 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 390 | "dev": true 391 | }, 392 | "is-typedarray": { 393 | "version": "1.0.0", 394 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 395 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 396 | }, 397 | "isexe": { 398 | "version": "2.0.0", 399 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 400 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 401 | "dev": true 402 | }, 403 | "isstream": { 404 | "version": "0.1.2", 405 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 406 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 407 | }, 408 | "istanbul": { 409 | "version": "0.4.5", 410 | "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", 411 | "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", 412 | "dev": true, 413 | "requires": { 414 | "abbrev": "1.0.x", 415 | "async": "1.x", 416 | "escodegen": "1.8.x", 417 | "esprima": "2.7.x", 418 | "glob": "^5.0.15", 419 | "handlebars": "^4.0.1", 420 | "js-yaml": "3.x", 421 | "mkdirp": "0.5.x", 422 | "nopt": "3.x", 423 | "once": "1.x", 424 | "resolve": "1.1.x", 425 | "supports-color": "^3.1.0", 426 | "which": "^1.1.1", 427 | "wordwrap": "^1.0.0" 428 | }, 429 | "dependencies": { 430 | "supports-color": { 431 | "version": "3.2.3", 432 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", 433 | "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", 434 | "dev": true, 435 | "requires": { 436 | "has-flag": "^1.0.0" 437 | } 438 | } 439 | } 440 | }, 441 | "js-yaml": { 442 | "version": "3.12.0", 443 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", 444 | "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", 445 | "dev": true, 446 | "requires": { 447 | "argparse": "^1.0.7", 448 | "esprima": "^4.0.0" 449 | }, 450 | "dependencies": { 451 | "esprima": { 452 | "version": "4.0.1", 453 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 454 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 455 | "dev": true 456 | } 457 | } 458 | }, 459 | "jsbn": { 460 | "version": "0.1.1", 461 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 462 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", 463 | "optional": true 464 | }, 465 | "json-schema": { 466 | "version": "0.2.3", 467 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 468 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 469 | }, 470 | "json-schema-traverse": { 471 | "version": "0.3.1", 472 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", 473 | "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" 474 | }, 475 | "json-stringify-safe": { 476 | "version": "5.0.1", 477 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 478 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 479 | }, 480 | "jsprim": { 481 | "version": "1.4.1", 482 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 483 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 484 | "requires": { 485 | "assert-plus": "1.0.0", 486 | "extsprintf": "1.3.0", 487 | "json-schema": "0.2.3", 488 | "verror": "1.10.0" 489 | } 490 | }, 491 | "lcov-parse": { 492 | "version": "0.0.10", 493 | "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz", 494 | "integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM=" 495 | }, 496 | "levn": { 497 | "version": "0.3.0", 498 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 499 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 500 | "dev": true, 501 | "requires": { 502 | "prelude-ls": "~1.1.2", 503 | "type-check": "~0.3.2" 504 | } 505 | }, 506 | "lodash": { 507 | "version": "4.17.11", 508 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", 509 | "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", 510 | "dev": true 511 | }, 512 | "mime-db": { 513 | "version": "1.36.0", 514 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", 515 | "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" 516 | }, 517 | "mime-types": { 518 | "version": "2.1.20", 519 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", 520 | "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", 521 | "requires": { 522 | "mime-db": "~1.36.0" 523 | } 524 | }, 525 | "minimatch": { 526 | "version": "3.0.4", 527 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 528 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 529 | "dev": true, 530 | "requires": { 531 | "brace-expansion": "^1.1.7" 532 | } 533 | }, 534 | "minimist": { 535 | "version": "0.0.10", 536 | "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", 537 | "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", 538 | "dev": true 539 | }, 540 | "mkdirp": { 541 | "version": "0.5.1", 542 | "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 543 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 544 | "dev": true, 545 | "requires": { 546 | "minimist": "0.0.8" 547 | }, 548 | "dependencies": { 549 | "minimist": { 550 | "version": "0.0.8", 551 | "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 552 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", 553 | "dev": true 554 | } 555 | } 556 | }, 557 | "mocha": { 558 | "version": "5.2.0", 559 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", 560 | "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", 561 | "dev": true, 562 | "requires": { 563 | "browser-stdout": "1.3.1", 564 | "commander": "2.15.1", 565 | "debug": "3.1.0", 566 | "diff": "3.5.0", 567 | "escape-string-regexp": "1.0.5", 568 | "glob": "7.1.2", 569 | "growl": "1.10.5", 570 | "he": "1.1.1", 571 | "minimatch": "3.0.4", 572 | "mkdirp": "0.5.1", 573 | "supports-color": "5.4.0" 574 | }, 575 | "dependencies": { 576 | "commander": { 577 | "version": "2.15.1", 578 | "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz", 579 | "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", 580 | "dev": true 581 | }, 582 | "glob": { 583 | "version": "7.1.2", 584 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", 585 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", 586 | "dev": true, 587 | "requires": { 588 | "fs.realpath": "^1.0.0", 589 | "inflight": "^1.0.4", 590 | "inherits": "2", 591 | "minimatch": "^3.0.4", 592 | "once": "^1.3.0", 593 | "path-is-absolute": "^1.0.0" 594 | } 595 | } 596 | } 597 | }, 598 | "ms": { 599 | "version": "2.0.0", 600 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 601 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", 602 | "dev": true 603 | }, 604 | "nopt": { 605 | "version": "3.0.6", 606 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", 607 | "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", 608 | "dev": true, 609 | "requires": { 610 | "abbrev": "1" 611 | } 612 | }, 613 | "oauth-sign": { 614 | "version": "0.9.0", 615 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 616 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 617 | }, 618 | "once": { 619 | "version": "1.4.0", 620 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 621 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 622 | "dev": true, 623 | "requires": { 624 | "wrappy": "1" 625 | } 626 | }, 627 | "optimist": { 628 | "version": "0.6.1", 629 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 630 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", 631 | "dev": true, 632 | "requires": { 633 | "minimist": "~0.0.1", 634 | "wordwrap": "~0.0.2" 635 | }, 636 | "dependencies": { 637 | "wordwrap": { 638 | "version": "0.0.3", 639 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 640 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", 641 | "dev": true 642 | } 643 | } 644 | }, 645 | "optionator": { 646 | "version": "0.8.2", 647 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", 648 | "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", 649 | "dev": true, 650 | "requires": { 651 | "deep-is": "~0.1.3", 652 | "fast-levenshtein": "~2.0.4", 653 | "levn": "~0.3.0", 654 | "prelude-ls": "~1.1.2", 655 | "type-check": "~0.3.2", 656 | "wordwrap": "~1.0.0" 657 | } 658 | }, 659 | "path-is-absolute": { 660 | "version": "1.0.1", 661 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 662 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 663 | "dev": true 664 | }, 665 | "performance-now": { 666 | "version": "2.1.0", 667 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 668 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 669 | }, 670 | "prelude-ls": { 671 | "version": "1.1.2", 672 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 673 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 674 | "dev": true 675 | }, 676 | "psl": { 677 | "version": "1.1.29", 678 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", 679 | "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" 680 | }, 681 | "punycode": { 682 | "version": "1.4.1", 683 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 684 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 685 | }, 686 | "qs": { 687 | "version": "6.5.2", 688 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 689 | "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" 690 | }, 691 | "request": { 692 | "version": "2.88.0", 693 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", 694 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", 695 | "requires": { 696 | "aws-sign2": "~0.7.0", 697 | "aws4": "^1.8.0", 698 | "caseless": "~0.12.0", 699 | "combined-stream": "~1.0.6", 700 | "extend": "~3.0.2", 701 | "forever-agent": "~0.6.1", 702 | "form-data": "~2.3.2", 703 | "har-validator": "~5.1.0", 704 | "http-signature": "~1.2.0", 705 | "is-typedarray": "~1.0.0", 706 | "isstream": "~0.1.2", 707 | "json-stringify-safe": "~5.0.1", 708 | "mime-types": "~2.1.19", 709 | "oauth-sign": "~0.9.0", 710 | "performance-now": "^2.1.0", 711 | "qs": "~6.5.2", 712 | "safe-buffer": "^5.1.2", 713 | "tough-cookie": "~2.4.3", 714 | "tunnel-agent": "^0.6.0", 715 | "uuid": "^3.3.2" 716 | } 717 | }, 718 | "resolve": { 719 | "version": "1.1.7", 720 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", 721 | "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", 722 | "dev": true 723 | }, 724 | "safe-buffer": { 725 | "version": "5.1.2", 726 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 727 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 728 | }, 729 | "safer-buffer": { 730 | "version": "2.1.2", 731 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 732 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 733 | }, 734 | "source-map": { 735 | "version": "0.2.0", 736 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", 737 | "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", 738 | "dev": true, 739 | "optional": true, 740 | "requires": { 741 | "amdefine": ">=0.0.4" 742 | } 743 | }, 744 | "sprintf-js": { 745 | "version": "1.0.3", 746 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 747 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 748 | "dev": true 749 | }, 750 | "sshpk": { 751 | "version": "1.14.2", 752 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", 753 | "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", 754 | "requires": { 755 | "asn1": "~0.2.3", 756 | "assert-plus": "^1.0.0", 757 | "bcrypt-pbkdf": "^1.0.0", 758 | "dashdash": "^1.12.0", 759 | "ecc-jsbn": "~0.1.1", 760 | "getpass": "^0.1.1", 761 | "jsbn": "~0.1.0", 762 | "safer-buffer": "^2.0.2", 763 | "tweetnacl": "~0.14.0" 764 | } 765 | }, 766 | "supports-color": { 767 | "version": "5.4.0", 768 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", 769 | "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", 770 | "dev": true, 771 | "requires": { 772 | "has-flag": "^3.0.0" 773 | }, 774 | "dependencies": { 775 | "has-flag": { 776 | "version": "3.0.0", 777 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 778 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 779 | "dev": true 780 | } 781 | } 782 | }, 783 | "tough-cookie": { 784 | "version": "2.4.3", 785 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", 786 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", 787 | "requires": { 788 | "psl": "^1.1.24", 789 | "punycode": "^1.4.1" 790 | } 791 | }, 792 | "tunnel-agent": { 793 | "version": "0.6.0", 794 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 795 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 796 | "requires": { 797 | "safe-buffer": "^5.0.1" 798 | } 799 | }, 800 | "tweetnacl": { 801 | "version": "0.14.5", 802 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 803 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", 804 | "optional": true 805 | }, 806 | "type-check": { 807 | "version": "0.3.2", 808 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 809 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 810 | "dev": true, 811 | "requires": { 812 | "prelude-ls": "~1.1.2" 813 | } 814 | }, 815 | "uglify-js": { 816 | "version": "3.4.9", 817 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", 818 | "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", 819 | "dev": true, 820 | "optional": true, 821 | "requires": { 822 | "commander": "~2.17.1", 823 | "source-map": "~0.6.1" 824 | }, 825 | "dependencies": { 826 | "commander": { 827 | "version": "2.17.1", 828 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", 829 | "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", 830 | "dev": true, 831 | "optional": true 832 | }, 833 | "source-map": { 834 | "version": "0.6.1", 835 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 836 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 837 | "dev": true, 838 | "optional": true 839 | } 840 | } 841 | }, 842 | "uuid": { 843 | "version": "3.3.2", 844 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", 845 | "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" 846 | }, 847 | "verror": { 848 | "version": "1.10.0", 849 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 850 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 851 | "requires": { 852 | "assert-plus": "^1.0.0", 853 | "core-util-is": "1.0.2", 854 | "extsprintf": "^1.2.0" 855 | } 856 | }, 857 | "which": { 858 | "version": "1.3.1", 859 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 860 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 861 | "dev": true, 862 | "requires": { 863 | "isexe": "^2.0.0" 864 | } 865 | }, 866 | "wordwrap": { 867 | "version": "1.0.0", 868 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 869 | "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", 870 | "dev": true 871 | }, 872 | "wrappy": { 873 | "version": "1.0.2", 874 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 875 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 876 | "dev": true 877 | } 878 | } 879 | } 880 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codeclimate-test-reporter", 3 | "version": "0.5.1", 4 | "description": "Code Climate test reporter client for javascript projects", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "istanbul cover --report lcov _mocha" 8 | }, 9 | "bin": { 10 | "codeclimate-test-reporter": "./bin/codeclimate.js" 11 | }, 12 | "author": "Noah Davis", 13 | "license": "MIT", 14 | "devDependencies": { 15 | "istanbul": "^0.4.3", 16 | "mocha": "^5.2.0" 17 | }, 18 | "engines": { 19 | "node": ">= 4" 20 | }, 21 | "dependencies": { 22 | "async": "~1.5.2", 23 | "commander": "2.9.0", 24 | "lcov-parse": "0.0.10", 25 | "request": "~2.88.0" 26 | }, 27 | "repository": { 28 | "type": "git", 29 | "url": "git://github.com/codeclimate/javascript-test-reporter.git" 30 | }, 31 | "keywords": [ 32 | "coverage", 33 | "testing", 34 | "codeclimate" 35 | ], 36 | "bugs": { 37 | "url": "https://github.com/codeclimate/javascript-test-reporter/issues" 38 | }, 39 | "homepage": "https://github.com/codeclimate/javascript-test-reporter", 40 | "contributors": [ 41 | "Bodhi Philpot (http://theplant.jp)" 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /test/fixtures/cover.out: -------------------------------------------------------------------------------- 1 | mode: set 2 | golang.org/x/tools/cmd/cover/cover.go:44.14,50.2 5 0 3 | golang.org/x/tools/cmd/cover/cover.go:69.13,74.43 3 0 4 | golang.org/x/tools/cmd/cover/cover.go:78.2,79.16 2 0 5 | golang.org/x/tools/cmd/cover/cover.go:86.2,86.17 1 0 6 | golang.org/x/tools/cmd/cover/cover.go:92.2,92.20 1 0 7 | golang.org/x/tools/cmd/cover/cover.go:98.2,98.16 1 0 8 | golang.org/x/tools/cmd/cover/cover.go:74.43,76.3 1 0 9 | golang.org/x/tools/cmd/cover/cover.go:79.16,83.3 3 0 10 | golang.org/x/tools/cmd/cover/cover.go:86.17,89.3 2 0 11 | golang.org/x/tools/cmd/cover/cover.go:92.20,94.3 1 0 12 | golang.org/x/tools/cmd/cover/cover.go:94.3,96.3 1 0 13 | golang.org/x/tools/cmd/cover/cover.go:98.16,101.3 2 0 14 | golang.org/x/tools/cmd/cover/cover.go:105.25,107.20 2 0 15 | golang.org/x/tools/cmd/cover/cover.go:115.2,115.38 1 0 16 | golang.org/x/tools/cmd/cover/cover.go:119.2,119.17 1 0 17 | golang.org/x/tools/cmd/cover/cover.go:139.2,139.41 1 0 18 | golang.org/x/tools/cmd/cover/cover.go:107.20,108.20 1 0 19 | golang.org/x/tools/cmd/cover/cover.go:111.3,111.21 1 0 20 | golang.org/x/tools/cmd/cover/cover.go:108.20,110.4 1 0 21 | golang.org/x/tools/cmd/cover/cover.go:115.38,117.3 1 0 22 | golang.org/x/tools/cmd/cover/cover.go:119.17,120.16 1 0 23 | golang.org/x/tools/cmd/cover/cover.go:131.3,131.23 1 0 24 | golang.org/x/tools/cmd/cover/cover.go:121.3,122.32 1 0 25 | golang.org/x/tools/cmd/cover/cover.go:123.3,124.32 1 0 26 | golang.org/x/tools/cmd/cover/cover.go:125.3,126.35 1 0 27 | golang.org/x/tools/cmd/cover/cover.go:127.3,128.48 1 0 28 | golang.org/x/tools/cmd/cover/cover.go:131.23,133.4 1 0 29 | golang.org/x/tools/cmd/cover/cover.go:133.4,133.30 1 0 30 | golang.org/x/tools/cmd/cover/cover.go:133.30,135.4 1 0 31 | golang.org/x/tools/cmd/cover/cover.go:136.3,136.29 1 0 32 | golang.org/x/tools/cmd/cover/cover.go:136.29,138.3 1 0 33 | golang.org/x/tools/cmd/cover/cover.go:162.49,163.26 1 0 34 | golang.org/x/tools/cmd/cover/cover.go:230.2,230.10 1 0 35 | golang.org/x/tools/cmd/cover/cover.go:164.2,166.22 1 0 36 | golang.org/x/tools/cmd/cover/cover.go:182.3,182.61 1 0 37 | golang.org/x/tools/cmd/cover/cover.go:183.2,185.20 2 0 38 | golang.org/x/tools/cmd/cover/cover.go:199.3,199.32 1 0 39 | golang.org/x/tools/cmd/cover/cover.go:212.3,213.13 2 0 40 | golang.org/x/tools/cmd/cover/cover.go:214.2,216.45 1 0 41 | golang.org/x/tools/cmd/cover/cover.go:219.2,221.45 1 0 42 | golang.org/x/tools/cmd/cover/cover.go:224.2,226.45 1 0 43 | golang.org/x/tools/cmd/cover/cover.go:166.22,167.28 1 0 44 | golang.org/x/tools/cmd/cover/cover.go:168.4,169.30 1 0 45 | golang.org/x/tools/cmd/cover/cover.go:173.5,173.13 1 0 46 | golang.org/x/tools/cmd/cover/cover.go:174.4,175.30 1 0 47 | golang.org/x/tools/cmd/cover/cover.go:179.5,179.13 1 0 48 | golang.org/x/tools/cmd/cover/cover.go:169.30,172.6 2 0 49 | golang.org/x/tools/cmd/cover/cover.go:175.30,178.6 2 0 50 | golang.org/x/tools/cmd/cover/cover.go:185.20,187.4 1 0 51 | golang.org/x/tools/cmd/cover/cover.go:200.3,206.18 2 0 52 | golang.org/x/tools/cmd/cover/cover.go:207.3,208.30 1 0 53 | golang.org/x/tools/cmd/cover/cover.go:209.3,210.39 1 0 54 | golang.org/x/tools/cmd/cover/cover.go:216.45,218.4 1 0 55 | golang.org/x/tools/cmd/cover/cover.go:221.45,223.4 1 0 56 | golang.org/x/tools/cmd/cover/cover.go:226.45,228.4 1 0 57 | golang.org/x/tools/cmd/cover/cover.go:234.31,236.16 2 0 58 | golang.org/x/tools/cmd/cover/cover.go:239.2,239.10 1 0 59 | golang.org/x/tools/cmd/cover/cover.go:236.16,238.3 1 0 60 | golang.org/x/tools/cmd/cover/cover.go:244.46,246.38 1 0 61 | golang.org/x/tools/cmd/cover/cover.go:254.2,294.26 10 0 62 | golang.org/x/tools/cmd/cover/cover.go:246.38,247.36 1 0 63 | golang.org/x/tools/cmd/cover/cover.go:247.36,248.21 1 0 64 | golang.org/x/tools/cmd/cover/cover.go:251.4,251.30 1 0 65 | golang.org/x/tools/cmd/cover/cover.go:248.21,250.5 1 0 66 | golang.org/x/tools/cmd/cover/cover.go:304.45,308.17 3 0 67 | golang.org/x/tools/cmd/cover/cover.go:324.2,324.22 1 0 68 | golang.org/x/tools/cmd/cover/cover.go:308.17,310.47 2 0 69 | golang.org/x/tools/cmd/cover/cover.go:315.3,316.21 2 0 70 | golang.org/x/tools/cmd/cover/cover.go:320.3,320.41 1 0 71 | golang.org/x/tools/cmd/cover/cover.go:310.47,312.4 1 0 72 | golang.org/x/tools/cmd/cover/cover.go:312.4,314.4 1 0 73 | golang.org/x/tools/cmd/cover/cover.go:316.21,318.12 2 0 74 | golang.org/x/tools/cmd/cover/cover.go:320.41,321.9 1 0 75 | golang.org/x/tools/cmd/cover/cover.go:327.28,330.16 3 0 76 | golang.org/x/tools/cmd/cover/cover.go:333.2,334.16 2 0 77 | golang.org/x/tools/cmd/cover/cover.go:337.2,344.23 3 0 78 | golang.org/x/tools/cmd/cover/cover.go:347.2,349.19 3 0 79 | golang.org/x/tools/cmd/cover/cover.go:356.2,360.23 3 0 80 | golang.org/x/tools/cmd/cover/cover.go:330.16,332.3 1 0 81 | golang.org/x/tools/cmd/cover/cover.go:334.16,336.3 1 0 82 | golang.org/x/tools/cmd/cover/cover.go:344.23,346.3 1 0 83 | golang.org/x/tools/cmd/cover/cover.go:349.19,352.17 3 0 84 | golang.org/x/tools/cmd/cover/cover.go:352.17,354.4 1 0 85 | golang.org/x/tools/cmd/cover/cover.go:367.76,369.38 2 0 86 | golang.org/x/tools/cmd/cover/cover.go:380.2,380.17 1 0 87 | golang.org/x/tools/cmd/cover/cover.go:369.38,371.38 2 0 88 | golang.org/x/tools/cmd/cover/cover.go:376.3,376.18 1 0 89 | golang.org/x/tools/cmd/cover/cover.go:371.38,372.92 1 0 90 | golang.org/x/tools/cmd/cover/cover.go:372.92,374.5 1 0 91 | golang.org/x/tools/cmd/cover/cover.go:376.18,378.4 1 0 92 | golang.org/x/tools/cmd/cover/cover.go:383.35,385.2 1 0 93 | golang.org/x/tools/cmd/cover/cover.go:388.48,394.2 2 0 94 | golang.org/x/tools/cmd/cover/cover.go:397.38,399.2 1 0 95 | golang.org/x/tools/cmd/cover/cover.go:402.57,408.2 1 0 96 | golang.org/x/tools/cmd/cover/cover.go:411.57,416.2 1 0 97 | golang.org/x/tools/cmd/cover/cover.go:419.60,434.2 1 0 98 | golang.org/x/tools/cmd/cover/cover.go:437.71,448.2 4 0 99 | golang.org/x/tools/cmd/cover/cover.go:462.108,465.20 1 0 100 | golang.org/x/tools/cmd/cover/cover.go:470.2,471.6 2 0 101 | golang.org/x/tools/cmd/cover/cover.go:497.2,497.16 1 0 102 | golang.org/x/tools/cmd/cover/cover.go:465.20,467.3 1 0 103 | golang.org/x/tools/cmd/cover/cover.go:471.6,476.42 3 0 104 | golang.org/x/tools/cmd/cover/cover.go:484.3,484.27 1 0 105 | golang.org/x/tools/cmd/cover/cover.go:487.3,487.17 1 0 106 | golang.org/x/tools/cmd/cover/cover.go:490.3,492.21 3 0 107 | golang.org/x/tools/cmd/cover/cover.go:495.3,495.22 1 0 108 | golang.org/x/tools/cmd/cover/cover.go:476.42,478.42 2 0 109 | golang.org/x/tools/cmd/cover/cover.go:478.42,481.10 3 0 110 | golang.org/x/tools/cmd/cover/cover.go:484.27,486.4 1 0 111 | golang.org/x/tools/cmd/cover/cover.go:487.17,489.4 1 0 112 | golang.org/x/tools/cmd/cover/cover.go:492.21,493.9 1 0 113 | golang.org/x/tools/cmd/cover/cover.go:505.51,506.14 1 0 114 | golang.org/x/tools/cmd/cover/cover.go:509.2,511.44 3 0 115 | golang.org/x/tools/cmd/cover/cover.go:506.14,508.3 1 0 116 | golang.org/x/tools/cmd/cover/cover.go:516.56,518.23 1 0 117 | golang.org/x/tools/cmd/cover/cover.go:577.2,578.11 2 0 118 | golang.org/x/tools/cmd/cover/cover.go:581.2,581.16 1 0 119 | golang.org/x/tools/cmd/cover/cover.go:519.2,521.18 1 0 120 | golang.org/x/tools/cmd/cover/cover.go:522.2,524.12 2 0 121 | golang.org/x/tools/cmd/cover/cover.go:527.3,528.12 2 0 122 | golang.org/x/tools/cmd/cover/cover.go:531.3,531.23 1 0 123 | golang.org/x/tools/cmd/cover/cover.go:532.2,534.12 2 0 124 | golang.org/x/tools/cmd/cover/cover.go:537.3,538.12 2 0 125 | golang.org/x/tools/cmd/cover/cover.go:541.3,542.12 2 0 126 | golang.org/x/tools/cmd/cover/cover.go:545.3,545.23 1 0 127 | golang.org/x/tools/cmd/cover/cover.go:546.2,547.37 1 0 128 | golang.org/x/tools/cmd/cover/cover.go:548.2,550.12 2 0 129 | golang.org/x/tools/cmd/cover/cover.go:553.3,553.23 1 0 130 | golang.org/x/tools/cmd/cover/cover.go:554.2,556.12 2 0 131 | golang.org/x/tools/cmd/cover/cover.go:559.3,560.12 2 0 132 | golang.org/x/tools/cmd/cover/cover.go:563.3,563.23 1 0 133 | golang.org/x/tools/cmd/cover/cover.go:564.2,565.23 1 0 134 | golang.org/x/tools/cmd/cover/cover.go:566.2,568.12 2 0 135 | golang.org/x/tools/cmd/cover/cover.go:571.3,571.23 1 0 136 | golang.org/x/tools/cmd/cover/cover.go:524.12,526.4 1 0 137 | golang.org/x/tools/cmd/cover/cover.go:528.12,530.4 1 0 138 | golang.org/x/tools/cmd/cover/cover.go:534.12,536.4 1 0 139 | golang.org/x/tools/cmd/cover/cover.go:538.12,540.4 1 0 140 | golang.org/x/tools/cmd/cover/cover.go:542.12,544.4 1 0 141 | golang.org/x/tools/cmd/cover/cover.go:550.12,552.4 1 0 142 | golang.org/x/tools/cmd/cover/cover.go:556.12,558.4 1 0 143 | golang.org/x/tools/cmd/cover/cover.go:560.12,562.4 1 0 144 | golang.org/x/tools/cmd/cover/cover.go:568.12,570.4 1 0 145 | golang.org/x/tools/cmd/cover/cover.go:578.11,580.3 1 0 146 | golang.org/x/tools/cmd/cover/cover.go:587.54,588.23 1 0 147 | golang.org/x/tools/cmd/cover/cover.go:619.2,620.14 2 0 148 | golang.org/x/tools/cmd/cover/cover.go:589.2,591.14 1 0 149 | golang.org/x/tools/cmd/cover/cover.go:592.2,593.14 1 0 150 | golang.org/x/tools/cmd/cover/cover.go:594.2,595.14 1 0 151 | golang.org/x/tools/cmd/cover/cover.go:596.2,597.14 1 0 152 | golang.org/x/tools/cmd/cover/cover.go:598.2,599.40 1 0 153 | golang.org/x/tools/cmd/cover/cover.go:600.2,601.14 1 0 154 | golang.org/x/tools/cmd/cover/cover.go:602.2,603.14 1 0 155 | golang.org/x/tools/cmd/cover/cover.go:604.2,605.14 1 0 156 | golang.org/x/tools/cmd/cover/cover.go:606.2,607.14 1 0 157 | golang.org/x/tools/cmd/cover/cover.go:608.2,613.42 1 0 158 | golang.org/x/tools/cmd/cover/cover.go:613.42,614.94 1 0 159 | golang.org/x/tools/cmd/cover/cover.go:614.94,616.5 1 0 160 | golang.org/x/tools/cmd/cover/cover.go:627.62,628.15 1 0 161 | golang.org/x/tools/cmd/cover/cover.go:631.2,631.26 1 0 162 | golang.org/x/tools/cmd/cover/cover.go:636.2,636.10 1 0 163 | golang.org/x/tools/cmd/cover/cover.go:628.15,630.3 1 0 164 | golang.org/x/tools/cmd/cover/cover.go:632.2,634.13 2 0 165 | golang.org/x/tools/cmd/cover/cover.go:639.38,641.2 1 0 166 | golang.org/x/tools/cmd/cover/cover.go:652.41,652.58 1 0 167 | golang.org/x/tools/cmd/cover/cover.go:653.41,653.83 1 0 168 | golang.org/x/tools/cmd/cover/cover.go:654.41,654.68 1 0 169 | golang.org/x/tools/cmd/cover/cover.go:657.42,659.2 1 0 170 | golang.org/x/tools/cmd/cover/cover.go:662.42,665.26 2 0 171 | golang.org/x/tools/cmd/cover/cover.go:669.2,670.30 2 0 172 | golang.org/x/tools/cmd/cover/cover.go:681.2,694.33 7 0 173 | golang.org/x/tools/cmd/cover/cover.go:701.2,709.33 3 0 174 | golang.org/x/tools/cmd/cover/cover.go:718.2,721.23 2 0 175 | golang.org/x/tools/cmd/cover/cover.go:665.26,668.3 2 0 176 | golang.org/x/tools/cmd/cover/cover.go:670.30,671.38 1 0 177 | golang.org/x/tools/cmd/cover/cover.go:671.38,677.4 2 0 178 | golang.org/x/tools/cmd/cover/cover.go:694.33,698.3 3 0 179 | golang.org/x/tools/cmd/cover/cover.go:709.33,711.18 2 0 180 | golang.org/x/tools/cmd/cover/cover.go:714.3,714.42 1 0 181 | golang.org/x/tools/cmd/cover/cover.go:711.18,713.4 1 0 182 | golang.org/x/tools/cmd/cover/func.go:35.51,37.16 2 0 183 | golang.org/x/tools/cmd/cover/func.go:41.2,42.22 2 0 184 | golang.org/x/tools/cmd/cover/func.go:52.2,58.35 5 0 185 | golang.org/x/tools/cmd/cover/func.go:76.2,78.12 2 0 186 | golang.org/x/tools/cmd/cover/func.go:37.16,39.3 1 0 187 | golang.org/x/tools/cmd/cover/func.go:42.22,44.3 1 0 188 | golang.org/x/tools/cmd/cover/func.go:44.3,46.17 2 0 189 | golang.org/x/tools/cmd/cover/func.go:49.3,50.28 2 0 190 | golang.org/x/tools/cmd/cover/func.go:46.17,48.4 1 0 191 | golang.org/x/tools/cmd/cover/func.go:58.35,61.17 3 0 192 | golang.org/x/tools/cmd/cover/func.go:64.3,65.17 2 0 193 | golang.org/x/tools/cmd/cover/func.go:69.3,69.27 1 0 194 | golang.org/x/tools/cmd/cover/func.go:61.17,63.4 1 0 195 | golang.org/x/tools/cmd/cover/func.go:65.17,67.4 1 0 196 | golang.org/x/tools/cmd/cover/func.go:69.27,74.4 4 0 197 | golang.org/x/tools/cmd/cover/func.go:82.52,85.16 3 0 198 | golang.org/x/tools/cmd/cover/func.go:88.2,94.27 3 0 199 | golang.org/x/tools/cmd/cover/func.go:85.16,87.3 1 0 200 | golang.org/x/tools/cmd/cover/func.go:115.56,116.26 1 0 201 | golang.org/x/tools/cmd/cover/func.go:129.2,129.10 1 0 202 | golang.org/x/tools/cmd/cover/func.go:117.2,127.32 4 0 203 | golang.org/x/tools/cmd/cover/func.go:133.72,138.35 2 0 204 | golang.org/x/tools/cmd/cover/func.go:152.2,152.16 1 0 205 | golang.org/x/tools/cmd/cover/func.go:155.2,155.23 1 0 206 | golang.org/x/tools/cmd/cover/func.go:138.35,139.86 1 0 207 | golang.org/x/tools/cmd/cover/func.go:143.3,143.86 1 0 208 | golang.org/x/tools/cmd/cover/func.go:147.3,148.18 2 0 209 | golang.org/x/tools/cmd/cover/func.go:139.86,141.9 1 0 210 | golang.org/x/tools/cmd/cover/func.go:143.86,145.12 1 0 211 | golang.org/x/tools/cmd/cover/func.go:148.18,150.4 1 0 212 | golang.org/x/tools/cmd/cover/func.go:152.16,154.3 1 0 213 | golang.org/x/tools/cmd/cover/func.go:159.44,162.16 3 0 214 | golang.org/x/tools/cmd/cover/func.go:165.2,165.42 1 0 215 | golang.org/x/tools/cmd/cover/func.go:162.16,164.3 1 0 216 | golang.org/x/tools/cmd/cover/html.go:26.48,28.16 2 0 217 | golang.org/x/tools/cmd/cover/html.go:32.2,34.35 2 0 218 | golang.org/x/tools/cmd/cover/html.go:59.2,60.19 2 0 219 | golang.org/x/tools/cmd/cover/html.go:70.2,71.16 2 0 220 | golang.org/x/tools/cmd/cover/html.go:74.2,74.16 1 0 221 | golang.org/x/tools/cmd/cover/html.go:78.2,78.19 1 0 222 | golang.org/x/tools/cmd/cover/html.go:84.2,84.12 1 0 223 | golang.org/x/tools/cmd/cover/html.go:28.16,30.3 1 0 224 | golang.org/x/tools/cmd/cover/html.go:34.35,36.28 2 0 225 | golang.org/x/tools/cmd/cover/html.go:39.3,40.17 2 0 226 | golang.org/x/tools/cmd/cover/html.go:43.3,44.17 2 0 227 | golang.org/x/tools/cmd/cover/html.go:47.3,49.17 3 0 228 | golang.org/x/tools/cmd/cover/html.go:52.3,56.5 1 0 229 | golang.org/x/tools/cmd/cover/html.go:36.28,38.4 1 0 230 | golang.org/x/tools/cmd/cover/html.go:40.17,42.4 1 0 231 | golang.org/x/tools/cmd/cover/html.go:44.17,46.4 1 0 232 | golang.org/x/tools/cmd/cover/html.go:49.17,51.4 1 0 233 | golang.org/x/tools/cmd/cover/html.go:60.19,63.17 3 0 234 | golang.org/x/tools/cmd/cover/html.go:66.3,66.60 1 0 235 | golang.org/x/tools/cmd/cover/html.go:63.17,65.4 1 0 236 | golang.org/x/tools/cmd/cover/html.go:67.3,69.3 1 0 237 | golang.org/x/tools/cmd/cover/html.go:71.16,73.3 1 0 238 | golang.org/x/tools/cmd/cover/html.go:74.16,76.3 1 0 239 | golang.org/x/tools/cmd/cover/html.go:78.19,79.44 1 0 240 | golang.org/x/tools/cmd/cover/html.go:79.44,81.4 1 0 241 | golang.org/x/tools/cmd/cover/html.go:90.47,92.29 2 0 242 | golang.org/x/tools/cmd/cover/html.go:98.2,98.16 1 0 243 | golang.org/x/tools/cmd/cover/html.go:101.2,101.48 1 0 244 | golang.org/x/tools/cmd/cover/html.go:92.29,94.18 2 0 245 | golang.org/x/tools/cmd/cover/html.go:94.18,96.4 1 0 246 | golang.org/x/tools/cmd/cover/html.go:98.16,100.3 1 0 247 | golang.org/x/tools/cmd/cover/html.go:106.74,108.21 2 0 248 | golang.org/x/tools/cmd/cover/html.go:135.2,135.20 1 0 249 | golang.org/x/tools/cmd/cover/html.go:108.21,109.56 1 0 250 | golang.org/x/tools/cmd/cover/html.go:122.3,122.25 1 0 251 | golang.org/x/tools/cmd/cover/html.go:109.56,111.15 2 0 252 | golang.org/x/tools/cmd/cover/html.go:120.4,120.31 1 0 253 | golang.org/x/tools/cmd/cover/html.go:111.15,113.20 2 0 254 | golang.org/x/tools/cmd/cover/html.go:116.5,116.68 1 0 255 | golang.org/x/tools/cmd/cover/html.go:113.20,115.6 1 0 256 | golang.org/x/tools/cmd/cover/html.go:117.5,119.5 1 0 257 | golang.org/x/tools/cmd/cover/html.go:123.3,124.27 1 0 258 | golang.org/x/tools/cmd/cover/html.go:125.3,126.27 1 0 259 | golang.org/x/tools/cmd/cover/html.go:127.3,128.28 1 0 260 | golang.org/x/tools/cmd/cover/html.go:129.3,130.31 1 0 261 | golang.org/x/tools/cmd/cover/html.go:131.3,132.20 1 0 262 | golang.org/x/tools/cmd/cover/html.go:140.36,143.22 2 0 263 | golang.org/x/tools/cmd/cover/html.go:151.2,152.27 2 0 264 | golang.org/x/tools/cmd/cover/html.go:144.2,145.26 1 0 265 | golang.org/x/tools/cmd/cover/html.go:146.2,147.40 1 0 266 | golang.org/x/tools/cmd/cover/html.go:148.2,149.30 1 0 267 | golang.org/x/tools/cmd/cover/html.go:157.24,158.12 1 0 268 | golang.org/x/tools/cmd/cover/html.go:162.2,165.48 4 0 269 | golang.org/x/tools/cmd/cover/html.go:158.12,160.3 1 0 270 | golang.org/x/tools/cmd/cover/html.go:169.28,171.26 2 0 271 | golang.org/x/tools/cmd/cover/html.go:174.2,174.35 1 0 272 | golang.org/x/tools/cmd/cover/html.go:171.26,173.3 1 0 273 | -------------------------------------------------------------------------------- /test/fixtures/lcov.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:/Users/noah/p/request/lib/cookies.js 3 | FN:7,(anonymous_1) 4 | FN:17,RequestJar 5 | FN:20,(anonymous_3) 6 | FN:23,(anonymous_4) 7 | FN:27,(anonymous_5) 8 | FN:31,(anonymous_6) 9 | FN:32,(anonymous_7) 10 | FNF:7 11 | FNH:2 12 | FNDA:0,(anonymous_1) 13 | FNDA:1,RequestJar 14 | FNDA:0,(anonymous_3) 15 | FNDA:0,(anonymous_4) 16 | FNDA:1,(anonymous_5) 17 | FNDA:0,(anonymous_6) 18 | FNDA:0,(anonymous_7) 19 | DA:1,1 20 | DA:7,1 21 | DA:8,0 22 | DA:9,0 23 | DA:10,0 24 | DA:11,0 25 | DA:13,0 26 | DA:17,1 27 | DA:18,1 28 | DA:20,1 29 | DA:21,0 30 | DA:23,1 31 | DA:24,0 32 | DA:27,1 33 | DA:28,1 34 | DA:30,0 35 | DA:35,1 36 | LF:17 37 | LH:9 38 | BRDA:3,1,0,1 39 | BRDA:3,1,1,1 40 | BRDA:4,2,0,1 41 | BRDA:4,2,1,1 42 | BRDA:8,3,0,0 43 | BRDA:8,3,1,0 44 | BRDA:8,4,0,0 45 | BRDA:8,4,1,0 46 | BRDA:9,5,0,0 47 | BRDA:9,5,1,0 48 | BRDA:10,6,0,0 49 | BRDA:10,6,1,0 50 | BRDA:21,7,0,0 51 | BRDA:21,7,1,0 52 | BRDA:28,8,0,0 53 | BRDA:28,8,1,1 54 | BRF:16 55 | BRH:5 56 | end_of_record 57 | TN: 58 | SF:/Users/noah/p/request/lib/copy.js 59 | FN:2,copy 60 | FN:4,(anonymous_2) 61 | FNF:2 62 | FNH:2 63 | FNDA:4,copy 64 | FNDA:76,(anonymous_2) 65 | DA:1,1 66 | DA:3,4 67 | DA:4,4 68 | DA:5,76 69 | DA:7,4 70 | LF:5 71 | LH:5 72 | BRF:0 73 | BRH:0 74 | end_of_record 75 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | var assert = require("assert"); 2 | var fs = require('fs'); 3 | var Formatter = require('../formatter.js'); 4 | var CiInfo = require('../ci_info'); 5 | 6 | describe('JSON', function(){ 7 | 8 | var rootDirectory = "/Users/noah/p/request"; 9 | var lcovFixture = fs.readFileSync('test/fixtures/lcov.info').toString(); 10 | var gocoverFixture = fs.readFileSync('test/fixtures/cover.out').toString(); 11 | var formatter = new Formatter({rootDirectory: rootDirectory}); 12 | 13 | describe('parse', function() { 14 | it("should return the correct filenames", function(done) { 15 | formatter.format(lcovFixture, function(err, data) { 16 | var names = data.source_files.map(function(elem) { 17 | return elem.name; 18 | }); 19 | var expected = ["lib/cookies.js", "lib/copy.js"]; 20 | assert.deepEqual(expected, names); 21 | done(); 22 | }); 23 | }); 24 | }); 25 | 26 | describe('gocover', function() { 27 | it('should return the correct filenames', function(done) { 28 | process.env.GOPATH = rootDirectory; // files will be at $GOPATH/src 29 | formatter.format(gocoverFixture, function(err, data) { 30 | var names = data.source_files.map(function(elem) { 31 | return elem.name; 32 | }); 33 | var expected = [ 34 | 'src/golang.org/x/tools/cmd/cover/cover.go', 35 | 'src/golang.org/x/tools/cmd/cover/func.go', 36 | 'src/golang.org/x/tools/cmd/cover/html.go' 37 | ]; 38 | assert.deepEqual(expected, names); 39 | done(); 40 | }); 41 | }); 42 | }); 43 | }); 44 | 45 | describe('ci_info', function() { 46 | describe('#getInfo', function() { 47 | var bupenv = Object.keys(process.env); 48 | 49 | beforeEach(function(){ 50 | delete process.env['TRAVIS']; 51 | delete process.env['CIRCLECI']; 52 | }); 53 | 54 | afterEach(function(){ 55 | for(var pk in process.env) { 56 | if (bupenv.indexOf(pk) < 0) { 57 | delete process.env[pk]; 58 | } 59 | } 60 | }); 61 | 62 | it('should return travis-ci as name if process.env.TRAVIS is set', function() { 63 | process.env.TRAVIS = 'true'; 64 | 65 | var ci = CiInfo.getInfo(); 66 | assert.equal(ci.name, 'travis-ci'); 67 | }); 68 | 69 | it('should return appveyor as name if process.env.APPVEYOR is set', function() { 70 | process.env.APPVEYOR = 'true'; 71 | 72 | var ci = CiInfo.getInfo(); 73 | assert.equal(ci.name, 'appveyor'); 74 | }); 75 | 76 | it('should return buildkite as name if process.env.BUILDKITE is set', function() { 77 | process.env.BUILDKITE = 'true'; 78 | 79 | var ci = CiInfo.getInfo(); 80 | assert.equal(ci.name, 'buildkite'); 81 | }); 82 | 83 | it('should return gitlab-ci as name if process.env.GITLAB_CI is set', function() { 84 | process.env.GITLAB_CI = 'true'; 85 | 86 | var ci = CiInfo.getInfo(); 87 | assert.equal(ci.name, 'gitlab-ci'); 88 | }); 89 | }); 90 | }); 91 | --------------------------------------------------------------------------------