├── .editorconfig ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── .travis.yml ├── LICENSE.md ├── README.md ├── dangerfile.ts ├── package.json ├── src ├── __tests__ │ ├── __fixtures__ │ │ ├── failed-tests-j20.json │ │ ├── failing-tests.json │ │ └── passing-tests.json │ ├── fails.test.ts │ └── index.test.ts ├── ambient.d.ts ├── index.ts └── types.ts ├── tsconfig.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 2 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['macklinu', 'macklinu/typescript'], 3 | overrides: [ 4 | { 5 | files: ['src/**/*.test.ts'], 6 | extends: ['macklinu/jest'], 7 | }, 8 | ], 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/node,visualstudiocode 3 | 4 | ### Node ### 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | 24 | # nyc test coverage 25 | .nyc_output 26 | 27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 28 | .grunt 29 | 30 | # Bower dependency directory (https://bower.io/) 31 | bower_components 32 | 33 | # node-waf configuration 34 | .lock-wscript 35 | 36 | # Compiled binary addons (http://nodejs.org/api/addons.html) 37 | build/Release 38 | 39 | # Dependency directories 40 | node_modules/ 41 | jspm_packages/ 42 | 43 | # Typescript v1 declaration files 44 | typings/ 45 | 46 | # Optional npm cache directory 47 | .npm 48 | 49 | # Optional eslint cache 50 | .eslintcache 51 | 52 | # Optional REPL history 53 | .node_repl_history 54 | 55 | # Output of 'npm pack' 56 | *.tgz 57 | 58 | # Yarn Integrity file 59 | .yarn-integrity 60 | 61 | # dotenv environment variables file 62 | .env 63 | 64 | # Generated source 65 | dist/ 66 | 67 | ### VisualStudioCode ### 68 | .vscode/* 69 | !.vscode/settings.json 70 | !.vscode/tasks.json 71 | !.vscode/launch.json 72 | !.vscode/extensions.json 73 | 74 | # End of https://www.gitignore.io/api/node,visualstudiocode 75 | 76 | test-results.json 77 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsxSingleQuote": true, 3 | "semi": false, 4 | "singleQuote": true, 5 | "trailingComma": "es5" 6 | } 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: 3 | yarn: true 4 | directories: 5 | - node_modules 6 | notifications: 7 | email: false 8 | node_js: 9 | - '8' 10 | - '10' 11 | before_script: 12 | - npm prune 13 | script: 14 | - yarn run test -- --coverage --outputFile test-results.json --json 15 | - yarn run lint 16 | - yarn run build 17 | - npx danger ci 18 | - rm -f test-results.json 19 | after_success: 20 | - npm run semantic-release 21 | branches: 22 | except: 23 | - /^v\d+\.\d+\.\d+$/ 24 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright 2017 Macklin Underdown 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # danger-plugin-jest 2 | 3 | [![Build Status](https://travis-ci.org/macklinu/danger-plugin-jest.svg?branch=master)](https://travis-ci.org/macklinu/danger-plugin-jest) 4 | [![npm version](https://badge.fury.io/js/danger-plugin-jest.svg)](https://badge.fury.io/js/danger-plugin-jest) 5 | [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) 6 | 7 | > [Danger](https://github.com/danger/danger-js) plugin for Jest 8 | 9 | ## Usage 10 | 11 | ### Setup Jest 12 | 13 | This Danger plugin relies on modifying your Jest configuration slightly on CI to also output a JSON file of the results. 14 | 15 | You need to make the `yarn jest` command include: `--outputFile test-results.json --json`. This will run your tests 16 | like normal, but will also create a file with the full test results after. 17 | 18 | > You may also want to add the JSON output file to your `.gitignore`, since it doesn't need to be checked into source control. 19 | 20 | ### Setup Danger 21 | 22 | Install this Danger plugin: 23 | 24 | ```sh 25 | yarn add danger-plugin-jest --dev 26 | ``` 27 | 28 | By default, this package will assume you've set the filename as `test-results.json`, but you can use any path. 29 | 30 | ```js 31 | // dangerfile.js 32 | import path from 'path' 33 | import jest from 'danger-plugin-jest' 34 | 35 | // Default 36 | jest() 37 | // Custom path 38 | jest({ testResultsJsonPath: path.resolve(__dirname, 'tests/results.json') }) 39 | ``` 40 | 41 | See [`src/index.ts`](https://github.com/macklinu/danger-plugin-jest/blob/master/src/index.ts) for more details. 42 | 43 | ## Changelog 44 | 45 | See the GitHub [release history](https://github.com/macklinu/danger-plugin-jest/releases). 46 | 47 | ## Development 48 | 49 | Install [Yarn](https://yarnpkg.com/en/), and install the dependencies - `yarn install`. 50 | 51 | Run the [Jest](https://facebook.github.io/jest/) test suite with `yarn test`. 52 | 53 | This project uses [semantic-release](https://github.com/semantic-release/semantic-release) for automated NPM package publishing. 54 | 55 | :heart: 56 | -------------------------------------------------------------------------------- /dangerfile.ts: -------------------------------------------------------------------------------- 1 | import jest from './dist' 2 | 3 | jest({ showSuccessMessage: true }) 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "danger-plugin-jest", 3 | "version": "0.0.0-development", 4 | "description": "Danger plugin for Jest", 5 | "main": "dist/index.js", 6 | "types": "dist/index.d.ts", 7 | "files": [ 8 | "dist" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "prepush": "npm run test", 13 | "commitmsg": "validate-commit-msg", 14 | "build": "tsc -p tsconfig.json", 15 | "lint": "eslint 'src/**/*.ts'", 16 | "test": "jest", 17 | "prepublish": "npm run build", 18 | "semantic-release": "semantic-release pre && npm publish && semantic-release post" 19 | }, 20 | "repository": { 21 | "type": "git", 22 | "url": "https://github.com/macklinu/danger-plugin-jest.git" 23 | }, 24 | "keywords": [ 25 | "danger", 26 | "danger-plugin", 27 | "jest" 28 | ], 29 | "author": "Macklin Underdown ", 30 | "license": "MIT", 31 | "bugs": { 32 | "url": "https://github.com/macklinu/danger-plugin-jest/issues" 33 | }, 34 | "homepage": "https://github.com/macklinu/danger-plugin-jest#readme", 35 | "dependencies": { 36 | "strip-ansi": "^4.0.0" 37 | }, 38 | "devDependencies": { 39 | "@types/jest": "^24.0.15", 40 | "@types/node": "^8.0.37", 41 | "danger": "^9.0.3", 42 | "eslint": "^6.0.1", 43 | "eslint-config-macklinu": "^2.0.1", 44 | "husky": "^0.14.3", 45 | "jest": "^24.8.0", 46 | "lint-staged": "^4.2.3", 47 | "prettier": "^1.18.2", 48 | "semantic-release": "^6.3.6", 49 | "ts-jest": "^24.0.2", 50 | "typescript": "^3.5.3", 51 | "validate-commit-msg": "^2.12.1" 52 | }, 53 | "jest": { 54 | "preset": "ts-jest" 55 | }, 56 | "lint-staged": { 57 | "src/**/*.ts": [ 58 | "prettier --write", 59 | "git add" 60 | ], 61 | "*.json": [ 62 | "prettier --write", 63 | "git add" 64 | ] 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/__tests__/__fixtures__/failed-tests-j20.json: -------------------------------------------------------------------------------- 1 | { 2 | "numFailedTestSuites": 2, 3 | "numFailedTests": 4, 4 | "numPassedTestSuites": 0, 5 | "numPassedTests": 3, 6 | "numPendingTestSuites": 0, 7 | "numPendingTests": 0, 8 | "numRuntimeErrorTestSuites": 0, 9 | "numTotalTestSuites": 2, 10 | "numTotalTests": 7, 11 | "snapshot": { 12 | "added": 0, 13 | "didUpdate": false, 14 | "failure": false, 15 | "filesAdded": 0, 16 | "filesRemoved": 0, 17 | "filesUnmatched": 0, 18 | "filesUpdated": 0, 19 | "matched": 0, 20 | "total": 0, 21 | "unchecked": 0, 22 | "unmatched": 0, 23 | "updated": 0 24 | }, 25 | "startTime": 1507583662019, 26 | "success": false, 27 | "testResults": [ 28 | { 29 | "assertionResults": [ 30 | { 31 | "failureMessages": [], 32 | "status": "passed", 33 | "title": "messages with passing test results" 34 | }, 35 | { 36 | "failureMessages": [], 37 | "status": "passed", 38 | "title": "fails with failing test results" 39 | }, 40 | { 41 | "failureMessages": [], 42 | "status": "passed", 43 | "title": "warns when test results JSON file cannot be read" 44 | }, 45 | { 46 | "failureMessages": [ 47 | "Error: \u001b[2mexpect(\u001b[22m\u001b[31mobject\u001b[39m\u001b[2m).toContain(\u001b[22m\u001b[32mvalue\u001b[39m\u001b[2m)\u001b[22m\n\nExpected object:\n \u001b[31m{\"v\": \"asda\"}\u001b[39m\nTo contain value:\n \u001b[32m\"s\"\u001b[39m\n at Object. (/Users/orta/dev/projects/danger/danger-plugin-jest/src/__tests__/index.test.ts:42:24)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/p-map/index.js:42:16)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)" 48 | ], 49 | "status": "failed", 50 | "title": "Fails 6" 51 | } 52 | ], 53 | "endTime": 1507583663791, 54 | "message": "\u001b[1m\u001b[31m \u001b[1m● \u001b[1mFails 6\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mobject\u001b[39m\u001b[2m).toContain(\u001b[22m\u001b[32mvalue\u001b[39m\u001b[2m)\u001b[22m\n \n Expected object:\n \u001b[31m{\"v\": \"asda\"}\u001b[39m\n To contain value:\n \u001b[32m\"s\"\u001b[39m\n\u001b[2m \n \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/__tests__/index.test.ts\u001b[39m\u001b[0m\u001b[2m:42:24)\u001b[2m\n at Promise ()\n at \n \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:188:7)\u001b[2m\u001b[22m\n", 55 | "name": "/Users/orta/dev/projects/danger/danger-plugin-jest/src/__tests__/index.test.ts", 56 | "startTime": 1507583662616, 57 | "status": "failed", 58 | "summary": "" 59 | }, 60 | { 61 | "assertionResults": [ 62 | { 63 | "failureMessages": [ 64 | "Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n\nExpected value to equal:\n \u001b[32m2\u001b[39m\nReceived:\n \u001b[31m1\u001b[39m\n at Object. (/Users/orta/dev/projects/danger/danger-plugin-jest/src/__tests__/fails.test.ts:2:13)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/p-map/index.js:42:16)\n at " 65 | ], 66 | "status": "failed", 67 | "title": "Fails 1" 68 | }, 69 | { 70 | "failureMessages": [ 71 | "Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m)[.not].toBeLessThanOrEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n\nReceived value must be a number.\nReceived:\n string: \u001b[31m\" asdasd\"\u001b[39m\n at Object. (/Users/orta/dev/projects/danger/danger-plugin-jest/src/__tests__/fails.test.ts:6:21)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/p-map/index.js:42:16)\n at " 72 | ], 73 | "status": "failed", 74 | "title": "Fails 2" 75 | }, 76 | { 77 | "failureMessages": [ 78 | "Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toBeFalsy(\u001b[22m\u001b[2m)\u001b[22m\n\nExpected value to be falsy, instead received\n \u001b[31m{\"a\": \"asda\"}\u001b[39m\n at Object. (/Users/orta/dev/projects/danger/danger-plugin-jest/src/__tests__/fails.test.ts:10:24)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/jasmine-async.js:68:30)\n at resolve (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:38:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/jest-jasmine2/build/queueRunner.js:31:21)\n at Promise.resolve.then.el (/Users/orta/dev/projects/danger/danger-plugin-jest/node_modules/p-map/index.js:42:16)\n at " 79 | ], 80 | "status": "failed", 81 | "title": "Fails 4" 82 | } 83 | ], 84 | "endTime": 1507583663917, 85 | "message": "\u001b[1m\u001b[31m \u001b[1m● \u001b[1mFails 1\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n \n Expected value to equal:\n \u001b[32m2\u001b[39m\n Received:\n \u001b[31m1\u001b[39m\n\u001b[2m \n \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/__tests__/fails.test.ts\u001b[39m\u001b[0m\u001b[2m:2:13)\u001b[2m\n at Promise ()\n at \u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mFails 2\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m)[.not].toBeLessThanOrEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n \n Received value must be a number.\n Received:\n string: \u001b[31m\" asdasd\"\u001b[39m\n\u001b[2m \n \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/__tests__/fails.test.ts\u001b[39m\u001b[0m\u001b[2m:6:21)\u001b[2m\n at Promise ()\n at \u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mFails 4\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toBeFalsy(\u001b[22m\u001b[2m)\u001b[22m\n \n Expected value to be falsy, instead received\n \u001b[31m{\"a\": \"asda\"}\u001b[39m\n\u001b[2m \n \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msrc/__tests__/fails.test.ts\u001b[39m\u001b[0m\u001b[2m:10:24)\u001b[2m\n at Promise ()\n at \u001b[22m\n", 86 | "name": "/Users/orta/dev/projects/danger/danger-plugin-jest/src/__tests__/fails.test.ts", 87 | "startTime": 1507583663809, 88 | "status": "failed", 89 | "summary": "" 90 | } 91 | ], 92 | "wasInterrupted": false, 93 | "coverageMap": { 94 | "/Users/orta/dev/projects/danger/danger-plugin-jest/src/index.ts": { 95 | "path": "/Users/orta/dev/projects/danger/danger-plugin-jest/src/index.ts", 96 | "statementMap": { 97 | "0": { 98 | "start": { "line": 1, "column": 13 }, 99 | "end": { "line": 1, "column": 42 } 100 | }, 101 | "1": { 102 | "start": { "line": 1, "column": 42 }, 103 | "end": { "line": 1, "column": 55 } 104 | }, 105 | "2": { 106 | "start": { "line": 2, "column": 0 }, 107 | "end": { "line": 2, "column": 62 } 108 | }, 109 | "3": { 110 | "start": { "line": 3, "column": 9 }, 111 | "end": { "line": 3, "column": 22 } 112 | }, 113 | "4": { 114 | "start": { "line": 4, "column": 11 }, 115 | "end": { "line": 4, "column": 26 } 116 | }, 117 | "5": { 118 | "start": { "line": 5, "column": 16 }, 119 | "end": { "line": 5, "column": 37 } 120 | }, 121 | "6": { 122 | "start": { "line": 7, "column": 4 }, 123 | "end": { "line": 7, "column": 43 } 124 | }, 125 | "7": { 126 | "start": { "line": 7, "column": 29 }, 127 | "end": { "line": 7, "column": 41 } 128 | }, 129 | "8": { 130 | "start": { "line": 8, "column": 13 }, 131 | "end": { "line": 8, "column": 39 } 132 | }, 133 | "9": { 134 | "start": { "line": 8, "column": 63 }, 135 | "end": { "line": 8, "column": 103 } 136 | }, 137 | "10": { 138 | "start": { "line": 9, "column": 4 }, 139 | "end": { "line": 29, "column": 5 } 140 | }, 141 | "11": { 142 | "start": { "line": 10, "column": 31 }, 143 | "end": { "line": 10, "column": 75 } 144 | }, 145 | "12": { 146 | "start": { "line": 11, "column": 26 }, 147 | "end": { "line": 11, "column": 54 } 148 | }, 149 | "13": { 150 | "start": { "line": 12, "column": 8 }, 151 | "end": { "line": 16, "column": 9 } 152 | }, 153 | "14": { 154 | "start": { "line": 14, "column": 12 }, 155 | "end": { "line": 14, "column": 50 } 156 | }, 157 | "15": { 158 | "start": { "line": 15, "column": 12 }, 159 | "end": { "line": 15, "column": 19 } 160 | }, 161 | "16": { 162 | "start": { "line": 17, "column": 22 }, 163 | "end": { "line": 17, "column": 102 } 164 | }, 165 | "17": { 166 | "start": { "line": 17, "column": 69 }, 167 | "end": { "line": 17, "column": 99 } 168 | }, 169 | "18": { 170 | "start": { "line": 18, "column": 8 }, 171 | "end": { "line": 23, "column": 11 } 172 | }, 173 | "19": { 174 | "start": { "line": 19, "column": 35 }, 175 | "end": { "line": 19, "column": 80 } 176 | }, 177 | "20": { 178 | "start": { "line": 20, "column": 35 }, 179 | "end": { "line": 20, "column": 109 } 180 | }, 181 | "21": { 182 | "start": { "line": 20, "column": 77 }, 183 | "end": { "line": 20, "column": 106 } 184 | }, 185 | "22": { 186 | "start": { "line": 21, "column": 30 }, 187 | "end": { "line": 21, "column": 82 } 188 | }, 189 | "23": { 190 | "start": { "line": 22, "column": 12 }, 191 | "end": { "line": 22, "column": 30 } 192 | }, 193 | "24": { 194 | "start": { "line": 27, "column": 8 }, 195 | "end": { "line": 27, "column": 25 } 196 | }, 197 | "25": { 198 | "start": { "line": 28, "column": 8 }, 199 | "end": { "line": 28, "column": 104 } 200 | }, 201 | "26": { 202 | "start": { "line": 31, "column": 0 }, 203 | "end": { "line": 31, "column": 23 } 204 | }, 205 | "27": { 206 | "start": { "line": 32, "column": 19 }, 207 | "end": { "line": 35, "column": 1 } 208 | }, 209 | "28": { 210 | "start": { "line": 33, "column": 15 }, 211 | "end": { "line": 33, "column": 37 } 212 | }, 213 | "29": { 214 | "start": { "line": 34, "column": 4 }, 215 | "end": { "line": 34, "column": 76 } 216 | }, 217 | "30": { 218 | "start": { "line": 36, "column": 26 }, 219 | "end": { "line": 36, "column": 441 } 220 | }, 221 | "31": { 222 | "start": { "line": 36, "column": 52 }, 223 | "end": { "line": 36, "column": 439 } 224 | }, 225 | "32": { 226 | "start": { "line": 37, "column": 23 }, 227 | "end": { "line": 37, "column": 233 } 228 | }, 229 | "33": { 230 | "start": { "line": 37, "column": 59 }, 231 | "end": { "line": 37, "column": 231 } 232 | }, 233 | "34": { 234 | "start": { "line": 37, "column": 171 }, 235 | "end": { "line": 37, "column": 207 } 236 | }, 237 | "35": { 238 | "start": { "line": 38, "column": 18 }, 239 | "end": { "line": 42, "column": 1 } 240 | }, 241 | "36": { 242 | "start": { "line": 39, "column": 19 }, 243 | "end": { "line": 39, "column": 42 } 244 | }, 245 | "37": { 246 | "start": { "line": 40, "column": 22 }, 247 | "end": { "line": 40, "column": 47 } 248 | }, 249 | "38": { 250 | "start": { "line": 41, "column": 4 }, 251 | "end": { "line": 41, "column": 72 } 252 | }, 253 | "39": { 254 | "start": { "line": 43, "column": 32 }, 255 | "end": { "line": 56, "column": 1 } 256 | }, 257 | "40": { 258 | "start": { "line": 44, "column": 4 }, 259 | "end": { "line": 46, "column": 5 } 260 | }, 261 | "41": { 262 | "start": { "line": 45, "column": 8 }, 263 | "end": { "line": 45, "column": 38 } 264 | }, 265 | "42": { 266 | "start": { "line": 47, "column": 4 }, 267 | "end": { "line": 55, "column": 33 } 268 | } 269 | }, 270 | "fnMap": { 271 | "0": { 272 | "name": "jest", 273 | "decl": { 274 | "start": { "line": 6, "column": 9 }, 275 | "end": { "line": 6, "column": 13 } 276 | }, 277 | "loc": { 278 | "start": { "line": 6, "column": 22 }, 279 | "end": { "line": 30, "column": 1 } 280 | }, 281 | "line": 6 282 | }, 283 | "1": { 284 | "name": "(anonymous_1)", 285 | "decl": { 286 | "start": { "line": 17, "column": 53 }, 287 | "end": { "line": 17, "column": 54 } 288 | }, 289 | "loc": { 290 | "start": { "line": 17, "column": 67 }, 291 | "end": { "line": 17, "column": 101 } 292 | }, 293 | "line": 17 294 | }, 295 | "2": { 296 | "name": "(anonymous_2)", 297 | "decl": { 298 | "start": { "line": 18, "column": 24 }, 299 | "end": { "line": 18, "column": 25 } 300 | }, 301 | "loc": { 302 | "start": { "line": 18, "column": 43 }, 303 | "end": { "line": 23, "column": 9 } 304 | }, 305 | "line": 18 306 | }, 307 | "3": { 308 | "name": "(anonymous_3)", 309 | "decl": { 310 | "start": { "line": 20, "column": 62 }, 311 | "end": { "line": 20, "column": 63 } 312 | }, 313 | "loc": { 314 | "start": { "line": 20, "column": 75 }, 315 | "end": { "line": 20, "column": 108 } 316 | }, 317 | "line": 20 318 | }, 319 | "4": { 320 | "name": "(anonymous_4)", 321 | "decl": { 322 | "start": { "line": 32, "column": 19 }, 323 | "end": { "line": 32, "column": 20 } 324 | }, 325 | "loc": { 326 | "start": { "line": 32, "column": 40 }, 327 | "end": { "line": 35, "column": 1 } 328 | }, 329 | "line": 32 330 | }, 331 | "5": { 332 | "name": "(anonymous_5)", 333 | "decl": { 334 | "start": { "line": 36, "column": 26 }, 335 | "end": { "line": 36, "column": 27 } 336 | }, 337 | "loc": { 338 | "start": { "line": 36, "column": 50 }, 339 | "end": { "line": 36, "column": 441 } 340 | }, 341 | "line": 36 342 | }, 343 | "6": { 344 | "name": "(anonymous_6)", 345 | "decl": { 346 | "start": { "line": 37, "column": 23 }, 347 | "end": { "line": 37, "column": 24 } 348 | }, 349 | "loc": { 350 | "start": { "line": 37, "column": 57 }, 351 | "end": { "line": 37, "column": 233 } 352 | }, 353 | "line": 37 354 | }, 355 | "7": { 356 | "name": "(anonymous_7)", 357 | "decl": { 358 | "start": { "line": 37, "column": 156 }, 359 | "end": { "line": 37, "column": 157 } 360 | }, 361 | "loc": { 362 | "start": { "line": 37, "column": 169 }, 363 | "end": { "line": 37, "column": 209 } 364 | }, 365 | "line": 37 366 | }, 367 | "8": { 368 | "name": "(anonymous_8)", 369 | "decl": { 370 | "start": { "line": 38, "column": 18 }, 371 | "end": { "line": 38, "column": 19 } 372 | }, 373 | "loc": { 374 | "start": { "line": 38, "column": 43 }, 375 | "end": { "line": 42, "column": 1 } 376 | }, 377 | "line": 38 378 | }, 379 | "9": { 380 | "name": "(anonymous_9)", 381 | "decl": { 382 | "start": { "line": 43, "column": 32 }, 383 | "end": { "line": 43, "column": 33 } 384 | }, 385 | "loc": { 386 | "start": { "line": 43, "column": 47 }, 387 | "end": { "line": 56, "column": 1 } 388 | }, 389 | "line": 43 390 | } 391 | }, 392 | "branchMap": { 393 | "0": { 394 | "loc": { 395 | "start": { "line": 7, "column": 4 }, 396 | "end": { "line": 7, "column": 43 } 397 | }, 398 | "type": "if", 399 | "locations": [ 400 | { 401 | "start": { "line": 7, "column": 4 }, 402 | "end": { "line": 7, "column": 43 } 403 | }, 404 | { 405 | "start": { "line": 7, "column": 4 }, 406 | "end": { "line": 7, "column": 43 } 407 | } 408 | ], 409 | "line": 7 410 | }, 411 | "1": { 412 | "loc": { 413 | "start": { "line": 8, "column": 63 }, 414 | "end": { "line": 8, "column": 103 } 415 | }, 416 | "type": "cond-expr", 417 | "locations": [ 418 | { 419 | "start": { "line": 8, "column": 79 }, 420 | "end": { "line": 8, "column": 98 } 421 | }, 422 | { 423 | "start": { "line": 8, "column": 101 }, 424 | "end": { "line": 8, "column": 103 } 425 | } 426 | ], 427 | "line": 8 428 | }, 429 | "2": { 430 | "loc": { 431 | "start": { "line": 12, "column": 8 }, 432 | "end": { "line": 16, "column": 9 } 433 | }, 434 | "type": "if", 435 | "locations": [ 436 | { 437 | "start": { "line": 12, "column": 8 }, 438 | "end": { "line": 16, "column": 9 } 439 | }, 440 | { 441 | "start": { "line": 12, "column": 8 }, 442 | "end": { "line": 16, "column": 9 } 443 | } 444 | ], 445 | "line": 12 446 | }, 447 | "3": { 448 | "loc": { 449 | "start": { "line": 34, "column": 50 }, 450 | "end": { "line": 34, "column": 72 } 451 | }, 452 | "type": "cond-expr", 453 | "locations": [ 454 | { 455 | "start": { "line": 34, "column": 57 }, 456 | "end": { "line": 34, "column": 67 } 457 | }, 458 | { 459 | "start": { "line": 34, "column": 70 }, 460 | "end": { "line": 34, "column": 72 } 461 | } 462 | ], 463 | "line": 34 464 | }, 465 | "4": { 466 | "loc": { 467 | "start": { "line": 36, "column": 91 }, 468 | "end": { "line": 36, "column": 142 } 469 | }, 470 | "type": "binary-expr", 471 | "locations": [ 472 | { 473 | "start": { "line": 36, "column": 91 }, 474 | "end": { "line": 36, "column": 113 } 475 | }, 476 | { 477 | "start": { "line": 36, "column": 117 }, 478 | "end": { "line": 36, "column": 142 } 479 | } 480 | ], 481 | "line": 36 482 | }, 483 | "5": { 484 | "loc": { 485 | "start": { "line": 36, "column": 202 }, 486 | "end": { "line": 36, "column": 264 } 487 | }, 488 | "type": "binary-expr", 489 | "locations": [ 490 | { 491 | "start": { "line": 36, "column": 202 }, 492 | "end": { "line": 36, "column": 224 } 493 | }, 494 | { 495 | "start": { "line": 36, "column": 228 }, 496 | "end": { "line": 36, "column": 264 } 497 | } 498 | ], 499 | "line": 36 500 | }, 501 | "6": { 502 | "loc": { 503 | "start": { "line": 36, "column": 335 }, 504 | "end": { "line": 36, "column": 397 } 505 | }, 506 | "type": "binary-expr", 507 | "locations": [ 508 | { 509 | "start": { "line": 36, "column": 335 }, 510 | "end": { "line": 36, "column": 357 } 511 | }, 512 | { 513 | "start": { "line": 36, "column": 361 }, 514 | "end": { "line": 36, "column": 397 } 515 | } 516 | ], 517 | "line": 36 518 | }, 519 | "7": { 520 | "loc": { 521 | "start": { "line": 41, "column": 11 }, 522 | "end": { "line": 41, "column": 71 } 523 | }, 524 | "type": "cond-expr", 525 | "locations": [ 526 | { 527 | "start": { "line": 41, "column": 25 }, 528 | "end": { "line": 41, "column": 64 } 529 | }, 530 | { 531 | "start": { "line": 41, "column": 67 }, 532 | "end": { "line": 41, "column": 71 } 533 | } 534 | ], 535 | "line": 41 536 | }, 537 | "8": { 538 | "loc": { 539 | "start": { "line": 44, "column": 4 }, 540 | "end": { "line": 46, "column": 5 } 541 | }, 542 | "type": "if", 543 | "locations": [ 544 | { 545 | "start": { "line": 44, "column": 4 }, 546 | "end": { "line": 46, "column": 5 } 547 | }, 548 | { 549 | "start": { "line": 44, "column": 4 }, 550 | "end": { "line": 46, "column": 5 } 551 | } 552 | ], 553 | "line": 44 554 | } 555 | }, 556 | "s": { 557 | "0": 1, 558 | "1": 1, 559 | "2": 1, 560 | "3": 1, 561 | "4": 1, 562 | "5": 1, 563 | "6": 3, 564 | "7": 0, 565 | "8": 3, 566 | "9": 3, 567 | "10": 3, 568 | "11": 3, 569 | "12": 2, 570 | "13": 2, 571 | "14": 1, 572 | "15": 1, 573 | "16": 1, 574 | "17": 22, 575 | "18": 1, 576 | "19": 1, 577 | "20": 1, 578 | "21": 4, 579 | "22": 1, 580 | "23": 1, 581 | "24": 1, 582 | "25": 1, 583 | "26": 1, 584 | "27": 1, 585 | "28": 4, 586 | "29": 4, 587 | "30": 1, 588 | "31": 4, 589 | "32": 1, 590 | "33": 1, 591 | "34": 4, 592 | "35": 1, 593 | "36": 4, 594 | "37": 4, 595 | "38": 4, 596 | "39": 1, 597 | "40": 4, 598 | "41": 0, 599 | "42": 4 600 | }, 601 | "f": { 602 | "0": 3, 603 | "1": 22, 604 | "2": 1, 605 | "3": 4, 606 | "4": 4, 607 | "5": 4, 608 | "6": 1, 609 | "7": 4, 610 | "8": 4, 611 | "9": 4 612 | }, 613 | "b": { 614 | "0": [0, 3], 615 | "1": [0, 3], 616 | "2": [1, 1], 617 | "3": [4, 0], 618 | "4": [4, 4], 619 | "5": [4, 4], 620 | "6": [4, 4], 621 | "7": [4, 0], 622 | "8": [0, 4] 623 | }, 624 | "_coverageSchema": "332fd63041d2c1bcb487cc26dd0d5f7d97098a6c", 625 | "hash": "2645bde50337e6a61f07583cb1a7fb82316f9857" 626 | } 627 | } 628 | } 629 | -------------------------------------------------------------------------------- /src/__tests__/__fixtures__/failing-tests.json: -------------------------------------------------------------------------------- 1 | { 2 | "numFailedTestSuites": 1, 3 | "numFailedTests": 4, 4 | "numPassedTestSuites": 21, 5 | "numPassedTests": 198, 6 | "numPendingTestSuites": 0, 7 | "numPendingTests": 0, 8 | "numRuntimeErrorTestSuites": 0, 9 | "numTotalTestSuites": 22, 10 | "numTotalTests": 202, 11 | "snapshot": { 12 | "added": 0, 13 | "didUpdate": false, 14 | "failure": false, 15 | "filesAdded": 0, 16 | "filesRemoved": 0, 17 | "filesUnmatched": 0, 18 | "filesUpdated": 0, 19 | "matched": 6, 20 | "total": 6, 21 | "unchecked": 0, 22 | "unmatched": 0, 23 | "updated": 0 24 | }, 25 | "startTime": 1507554401713, 26 | "success": false, 27 | "testResults": [ 28 | { 29 | "console": null, 30 | "failureMessage": "\u001b[1m\u001b[31m \u001b[1m● \u001b[1mdangerfilePath › should return anything passed into the program's dangerfile\u001b[39m\u001b[22m\n\n \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n \n Expected value to equal:\n \u001b[32m\"123\"\u001b[39m\n Received:\n \u001b[31m\"23\"\u001b[39m\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msource/commands/utils/_tests/file-utils.test.ts\u001b[39m\u001b[0m\u001b[2m:10:50)\u001b[2m\u001b[22m\n\u001b[2m at Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:188:7)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mdangerfilePath › should find a dangerfile.js if there is no program, and the .js file exists\u001b[39m\u001b[22m\n\n ReferenceError: mockDangerfilePath is not defined\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msource/commands/utils/_tests/file-utils.test.ts\u001b[39m\u001b[0m\u001b[2m:14:23)\u001b[2m\u001b[22m\n\u001b[2m at Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:188:7)\u001b[2m\u001b[22m\n\n\u001bA float[1m\u001b[31m \u001b[1m● \u001b[1mdangerfilePath › should find a dangerfile.ts if there is no program, and the .js file does not exist\u001b[39m\u001b[22m\n\n ReferenceError: mockDangerfilePath is not defined\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msource/commands/utils/_tests/file-utils.test.ts\u001b[39m\u001b[0m\u001b[2m:19:23)\u001b[2m\u001b[22m\n\u001b[2m at Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:188:7)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m \u001b[1m● \u001b[1mdangerfilePath › should raise if nothing exists\u001b[39m\u001b[22m\n\n ReferenceError: mockDangerfilePath is not defined\n\u001b[2m \u001b[22m\n\u001b[2m \u001b[2mat Object. (\u001b[2m\u001b[0m\u001b[36msource/commands/utils/_tests/file-utils.test.ts\u001b[39m\u001b[0m\u001b[2m:24:23)\u001b[2m\u001b[22m\n\u001b[2m at Promise ()\u001b[22m\n\u001b[2m at \u001b[22m\n\u001b[2m \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:188:7)\u001b[2m\u001b[22m\n", 31 | "numFailingTests": 4, 32 | "numPassingTests": 0, 33 | "numPendingTests": 0, 34 | "perfStats": { "end": 1507554404688, "start": 1507554403029 }, 35 | "snapshot": { 36 | "added": 0, 37 | "fileDeleted": false, 38 | "matched": 0, 39 | "unchecked": 0, 40 | "unmatched": 0, 41 | "updated": 0 42 | }, 43 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/commands/utils/_tests/file-utils.test.ts", 44 | "testResults": [ 45 | { 46 | "ancestorTitles": ["dangerfilePath"], 47 | "duration": 211, 48 | "failureMessages": [ 49 | "Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).toEqual(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m)\u001b[22m\n\nExpected value to equal:\n \u001b[32m\"123\"\u001b[39m\nReceived:\n \u001b[31m\"23\"\u001b[39m\n at Object. (/Users/orta/dev/projects/danger/danger-js/source/commands/utils/_tests/file-utils.test.ts:10:50)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/jasmine_async.js:126:345)\n at resolve (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:47:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:36:499)\n at promise.then (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:75:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)" 50 | ], 51 | "fullName": "dangerfilePath should return anything passed into the program's dangerfile", 52 | "numPassingAsserts": 0, 53 | "status": "failed", 54 | "title": "should return anything passed into the program's dangerfile" 55 | }, 56 | { 57 | "ancestorTitles": ["dangerfilePath"], 58 | "duration": 1, 59 | "failureMessages": [ 60 | "ReferenceError: mockDangerfilePath is not defined\n at Object. (/Users/orta/dev/projects/danger/danger-js/source/commands/utils/_tests/file-utils.test.ts:14:23)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/jasmine_async.js:126:345)\n at resolve (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:47:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:36:499)\n at promise.then (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:75:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)" 61 | ], 62 | "fullName": "dangerfilePath should find a dangerfile.js if there is no program, and the .js file exists", 63 | "numPassingAsserts": 0, 64 | "status": "failed", 65 | "title": "should find a dangerfile.js if there is no program, and the .js file exists" 66 | }, 67 | { 68 | "ancestorTitles": ["dangerfilePath"], 69 | "duration": 1, 70 | "failureMessages": [ 71 | "ReferenceError: mockDangerfilePath is not defined\n at Object. (/Users/orta/dev/projects/danger/danger-js/source/commands/utils/_tests/file-utils.test.ts:19:23)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/jasmine_async.js:126:345)\n at resolve (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:47:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:36:499)\n at promise.then (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:75:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)" 72 | ], 73 | "fullName": "dangerfilePath should find a dangerfile.ts if there is no program, and the .js file does not exist", 74 | "numPassingAsserts": 0, 75 | "status": "failed", 76 | "title": "should find a dangerfile.ts if there is no program, and the .js file does not exist" 77 | }, 78 | { 79 | "ancestorTitles": ["dangerfilePath"], 80 | "duration": 0, 81 | "failureMessages": [ 82 | "ReferenceError: mockDangerfilePath is not defined\n at Object. (/Users/orta/dev/projects/danger/danger-js/source/commands/utils/_tests/file-utils.test.ts:24:23)\n at Object.asyncFn (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/jasmine_async.js:126:345)\n at resolve (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:47:12)\n at Promise ()\n at mapper (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:36:499)\n at promise.then (/Users/orta/dev/projects/danger/danger-js/node_modules/jest-jasmine2/build/queue_runner.js:75:39)\n at \n at process._tickCallback (internal/process/next_tick.js:188:7)" 83 | ], 84 | "fullName": "dangerfilePath should raise if nothing exists", 85 | "numPassingAsserts": 0, 86 | "status": "failed", 87 | "title": "should raise if nothing exists" 88 | } 89 | ], 90 | "sourceMaps": {}, 91 | "skipped": false 92 | }, 93 | { 94 | "console": null, 95 | "failureMessage": null, 96 | "numFailingTests": 0, 97 | "numPassingTests": 8, 98 | "numPendingTests": 0, 99 | "perfStats": { "end": 1507554405049, "start": 1507554403106 }, 100 | "snapshot": { 101 | "added": 0, 102 | "fileDeleted": false, 103 | "matched": 0, 104 | "unchecked": 0, 105 | "unmatched": 0, 106 | "updated": 0 107 | }, 108 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/runner/_tests/_executor.test.ts", 109 | "testResults": [ 110 | { 111 | "ancestorTitles": ["setup"], 112 | "duration": 8, 113 | "failureMessages": [], 114 | "fullName": "setup gets diff / pr info in setup", 115 | "numPassingAsserts": 0, 116 | "status": "passed", 117 | "title": "gets diff / pr info in setup" 118 | }, 119 | { 120 | "ancestorTitles": ["setup"], 121 | "duration": 3, 122 | "failureMessages": [], 123 | "fullName": "setup gets diff / pr info / utils in setup", 124 | "numPassingAsserts": 0, 125 | "status": "passed", 126 | "title": "gets diff / pr info / utils in setup" 127 | }, 128 | { 129 | "ancestorTitles": ["setup"], 130 | "duration": 37, 131 | "failureMessages": [], 132 | "fullName": "setup Creates a DangerResults for a raising dangerfile", 133 | "numPassingAsserts": 0, 134 | "status": "passed", 135 | "title": "Creates a DangerResults for a raising dangerfile" 136 | }, 137 | { 138 | "ancestorTitles": ["setup"], 139 | "duration": 1, 140 | "failureMessages": [], 141 | "fullName": "setup Deletes a post when there are no messages", 142 | "numPassingAsserts": 0, 143 | "status": "passed", 144 | "title": "Deletes a post when there are no messages" 145 | }, 146 | { 147 | "ancestorTitles": ["setup"], 148 | "duration": 1, 149 | "failureMessages": [], 150 | "fullName": "setup Updates or Creates comments for warnings", 151 | "numPassingAsserts": 0, 152 | "status": "passed", 153 | "title": "Updates or Creates comments for warnings" 154 | }, 155 | { 156 | "ancestorTitles": ["setup"], 157 | "duration": 2, 158 | "failureMessages": [], 159 | "fullName": "setup Updates or Creates comments for warnings", 160 | "numPassingAsserts": 0, 161 | "status": "passed", 162 | "title": "Updates or Creates comments for warnings" 163 | }, 164 | { 165 | "ancestorTitles": ["setup"], 166 | "duration": 2, 167 | "failureMessages": [], 168 | "fullName": "setup Updates the status with success for a passed results", 169 | "numPassingAsserts": 0, 170 | "status": "passed", 171 | "title": "Updates the status with success for a passed results" 172 | }, 173 | { 174 | "ancestorTitles": ["setup"], 175 | "duration": 2, 176 | "failureMessages": [], 177 | "fullName": "setup Updates the status with success for a passed results", 178 | "numPassingAsserts": 0, 179 | "status": "passed", 180 | "title": "Updates the status with success for a passed results" 181 | } 182 | ], 183 | "sourceMaps": {}, 184 | "skipped": false 185 | }, 186 | { 187 | "console": null, 188 | "failureMessage": null, 189 | "numFailingTests": 0, 190 | "numPassingTests": 21, 191 | "numPendingTests": 0, 192 | "perfStats": { "end": 1507554405259, "start": 1507554404731 }, 193 | "snapshot": { 194 | "added": 0, 195 | "fileDeleted": false, 196 | "matched": 5, 197 | "unchecked": 0, 198 | "unmatched": 0, 199 | "updated": 0 200 | }, 201 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/platforms/github/_tests/_github_git.test.ts", 202 | "testResults": [ 203 | { 204 | "ancestorTitles": ["the dangerfile gitDSL"], 205 | "duration": 28, 206 | "failureMessages": [], 207 | "fullName": "the dangerfile gitDSL sets the modified/created/deleted", 208 | "numPassingAsserts": 0, 209 | "status": "passed", 210 | "title": "sets the modified/created/deleted" 211 | }, 212 | { 213 | "ancestorTitles": ["the dangerfile gitDSL"], 214 | "duration": 13, 215 | "failureMessages": [], 216 | "fullName": "the dangerfile gitDSL shows the diff for a specific file", 217 | "numPassingAsserts": 0, 218 | "status": "passed", 219 | "title": "shows the diff for a specific file" 220 | }, 221 | { 222 | "ancestorTitles": ["the dangerfile gitDSL"], 223 | "duration": 4, 224 | "failureMessages": [], 225 | "fullName": "the dangerfile gitDSL should include `before` text content of the file", 226 | "numPassingAsserts": 0, 227 | "status": "passed", 228 | "title": "should include `before` text content of the file" 229 | }, 230 | { 231 | "ancestorTitles": ["the dangerfile gitDSL"], 232 | "duration": 5, 233 | "failureMessages": [], 234 | "fullName": "the dangerfile gitDSL should include `after` text content of the file", 235 | "numPassingAsserts": 0, 236 | "status": "passed", 237 | "title": "should include `after` text content of the file" 238 | }, 239 | { 240 | "ancestorTitles": ["the dangerfile gitDSL"], 241 | "duration": 6, 242 | "failureMessages": [], 243 | "fullName": "the dangerfile gitDSL should include `added` text content of the file", 244 | "numPassingAsserts": 0, 245 | "status": "passed", 246 | "title": "should include `added` text content of the file" 247 | }, 248 | { 249 | "ancestorTitles": ["the dangerfile gitDSL"], 250 | "duration": 9, 251 | "failureMessages": [], 252 | "fullName": "the dangerfile gitDSL should include `removed` text content of the file", 253 | "numPassingAsserts": 0, 254 | "status": "passed", 255 | "title": "should include `removed` text content of the file" 256 | }, 257 | { 258 | "ancestorTitles": ["the dangerfile gitDSL"], 259 | "duration": 15, 260 | "failureMessages": [], 261 | "fullName": "the dangerfile gitDSL resolves to `null` for files not in modified_files", 262 | "numPassingAsserts": 0, 263 | "status": "passed", 264 | "title": "resolves to `null` for files not in modified_files" 265 | }, 266 | { 267 | "ancestorTitles": ["the dangerfile gitDSL"], 268 | "duration": 5, 269 | "failureMessages": [], 270 | "fullName": "the dangerfile gitDSL sets up commit data correctly", 271 | "numPassingAsserts": 0, 272 | "status": "passed", 273 | "title": "sets up commit data correctly" 274 | }, 275 | { 276 | "ancestorTitles": ["the dangerfile gitDSL", "JSONPatchForFile"], 277 | "duration": 8, 278 | "failureMessages": [], 279 | "fullName": "the dangerfile gitDSL JSONPatchForFile returns a null for files not in the change list", 280 | "numPassingAsserts": 0, 281 | "status": "passed", 282 | "title": "returns a null for files not in the change list" 283 | }, 284 | { 285 | "ancestorTitles": ["the dangerfile gitDSL", "JSONPatchForFile"], 286 | "duration": 9, 287 | "failureMessages": [], 288 | "fullName": "the dangerfile gitDSL JSONPatchForFile handles showing a patch for a created file", 289 | "numPassingAsserts": 0, 290 | "status": "passed", 291 | "title": "handles showing a patch for a created file" 292 | }, 293 | { 294 | "ancestorTitles": ["the dangerfile gitDSL", "JSONPatchForFile"], 295 | "duration": 6, 296 | "failureMessages": [], 297 | "fullName": "the dangerfile gitDSL JSONPatchForFile handles showing a patch for a deleted file", 298 | "numPassingAsserts": 0, 299 | "status": "passed", 300 | "title": "handles showing a patch for a deleted file" 301 | }, 302 | { 303 | "ancestorTitles": ["the dangerfile gitDSL", "JSONPatchForFile"], 304 | "duration": 9, 305 | "failureMessages": [], 306 | "fullName": "the dangerfile gitDSL JSONPatchForFile handles showing a patch for two different diff files", 307 | "numPassingAsserts": 0, 308 | "status": "passed", 309 | "title": "handles showing a patch for two different diff files" 310 | }, 311 | { 312 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 313 | "duration": 21, 314 | "failureMessages": [], 315 | "fullName": "the dangerfile gitDSL JSONDiffForFile returns an empty object for files not in the change list", 316 | "numPassingAsserts": 0, 317 | "status": "passed", 318 | "title": "returns an empty object for files not in the change list" 319 | }, 320 | { 321 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 322 | "duration": 8, 323 | "failureMessages": [], 324 | "fullName": "the dangerfile gitDSL JSONDiffForFile handles showing a patch for a created file", 325 | "numPassingAsserts": 0, 326 | "status": "passed", 327 | "title": "handles showing a patch for a created file" 328 | }, 329 | { 330 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 331 | "duration": 9, 332 | "failureMessages": [], 333 | "fullName": "the dangerfile gitDSL JSONDiffForFile handles showing a patch for a deleted file", 334 | "numPassingAsserts": 0, 335 | "status": "passed", 336 | "title": "handles showing a patch for a deleted file" 337 | }, 338 | { 339 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 340 | "duration": 5, 341 | "failureMessages": [], 342 | "fullName": "the dangerfile gitDSL JSONDiffForFile handles showing a patch for two different diff files", 343 | "numPassingAsserts": 0, 344 | "status": "passed", 345 | "title": "handles showing a patch for two different diff files" 346 | }, 347 | { 348 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 349 | "duration": 6, 350 | "failureMessages": [], 351 | "fullName": "the dangerfile gitDSL JSONDiffForFile handles a package.json change elegantly", 352 | "numPassingAsserts": 0, 353 | "status": "passed", 354 | "title": "handles a package.json change elegantly" 355 | }, 356 | { 357 | "ancestorTitles": ["the dangerfile gitDSL", "textDiffForFile"], 358 | "duration": 5, 359 | "failureMessages": [], 360 | "fullName": "the dangerfile gitDSL textDiffForFile returns a null for files not in the change list", 361 | "numPassingAsserts": 0, 362 | "status": "passed", 363 | "title": "returns a null for files not in the change list" 364 | }, 365 | { 366 | "ancestorTitles": ["the dangerfile gitDSL", "textDiffForFile"], 367 | "duration": 6, 368 | "failureMessages": [], 369 | "fullName": "the dangerfile gitDSL textDiffForFile returns a diff for created files", 370 | "numPassingAsserts": 0, 371 | "status": "passed", 372 | "title": "returns a diff for created files" 373 | }, 374 | { 375 | "ancestorTitles": ["the dangerfile gitDSL", "textDiffForFile"], 376 | "duration": 6, 377 | "failureMessages": [], 378 | "fullName": "the dangerfile gitDSL textDiffForFile returns a diff for deleted files", 379 | "numPassingAsserts": 0, 380 | "status": "passed", 381 | "title": "returns a diff for deleted files" 382 | }, 383 | { 384 | "ancestorTitles": ["the dangerfile gitDSL", "textDiffForFile"], 385 | "duration": 4, 386 | "failureMessages": [], 387 | "fullName": "the dangerfile gitDSL textDiffForFile returns a diff for modified files", 388 | "numPassingAsserts": 0, 389 | "status": "passed", 390 | "title": "returns a diff for modified files" 391 | } 392 | ], 393 | "sourceMaps": {}, 394 | "skipped": false 395 | }, 396 | { 397 | "console": null, 398 | "failureMessage": null, 399 | "numFailingTests": 0, 400 | "numPassingTests": 14, 401 | "numPendingTests": 0, 402 | "perfStats": { "end": 1507554405414, "start": 1507554405112 }, 403 | "snapshot": { 404 | "added": 0, 405 | "fileDeleted": false, 406 | "matched": 0, 407 | "unchecked": 0, 408 | "unmatched": 0, 409 | "updated": 0 410 | }, 411 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/platforms/github/_tests/_github_api.test.ts", 412 | "testResults": [ 413 | { 414 | "ancestorTitles": ["getPlatformDSLRepresentation"], 415 | "duration": 6, 416 | "failureMessages": [], 417 | "fullName": "getPlatformDSLRepresentation should return the correct review title from getReviewInfo", 418 | "numPassingAsserts": 0, 419 | "status": "passed", 420 | "title": "should return the correct review title from getReviewInfo" 421 | }, 422 | { 423 | "ancestorTitles": ["getPlatformDSLRepresentation"], 424 | "duration": 3, 425 | "failureMessages": [], 426 | "fullName": "getPlatformDSLRepresentation should get the issue label", 427 | "numPassingAsserts": 0, 428 | "status": "passed", 429 | "title": "should get the issue label" 430 | }, 431 | { 432 | "ancestorTitles": ["getPlatformDSLRepresentation"], 433 | "duration": 4, 434 | "failureMessages": [], 435 | "fullName": "getPlatformDSLRepresentation should get the commits of the pull request", 436 | "numPassingAsserts": 0, 437 | "status": "passed", 438 | "title": "should get the commits of the pull request" 439 | }, 440 | { 441 | "ancestorTitles": ["getPlatformDSLRepresentation"], 442 | "duration": 2, 443 | "failureMessages": [], 444 | "fullName": "getPlatformDSLRepresentation should get the reviews", 445 | "numPassingAsserts": 0, 446 | "status": "passed", 447 | "title": "should get the reviews" 448 | }, 449 | { 450 | "ancestorTitles": ["getPlatformDSLRepresentation"], 451 | "duration": 3, 452 | "failureMessages": [], 453 | "fullName": "getPlatformDSLRepresentation should get the reviewer requests", 454 | "numPassingAsserts": 0, 455 | "status": "passed", 456 | "title": "should get the reviewer requests" 457 | }, 458 | { 459 | "ancestorTitles": ["getPlatformDSLRepresentation"], 460 | "duration": 2, 461 | "failureMessages": [], 462 | "fullName": "getPlatformDSLRepresentation should get the pull request informations", 463 | "numPassingAsserts": 0, 464 | "status": "passed", 465 | "title": "should get the pull request informations" 466 | }, 467 | { 468 | "ancestorTitles": ["getPlatformDSLRepresentation"], 469 | "duration": 2, 470 | "failureMessages": [], 471 | "fullName": "getPlatformDSLRepresentation should set thisPR correct", 472 | "numPassingAsserts": 0, 473 | "status": "passed", 474 | "title": "should set thisPR correct" 475 | }, 476 | { 477 | "ancestorTitles": [], 478 | "duration": 12, 479 | "failureMessages": [], 480 | "fullName": "fileContents expects to grab PR JSON and pull out a file API call", 481 | "numPassingAsserts": 0, 482 | "status": "passed", 483 | "title": "fileContents expects to grab PR JSON and pull out a file API call" 484 | }, 485 | { 486 | "ancestorTitles": ["API testing"], 487 | "duration": 2, 488 | "failureMessages": [], 489 | "fullName": "API testing getUserInfo", 490 | "numPassingAsserts": 0, 491 | "status": "passed", 492 | "title": "getUserInfo" 493 | }, 494 | { 495 | "ancestorTitles": ["API testing"], 496 | "duration": 2, 497 | "failureMessages": [], 498 | "fullName": "API testing updateCommentWithID", 499 | "numPassingAsserts": 0, 500 | "status": "passed", 501 | "title": "updateCommentWithID" 502 | }, 503 | { 504 | "ancestorTitles": ["API testing"], 505 | "duration": 1, 506 | "failureMessages": [], 507 | "fullName": "API testing getPullRequestDiff", 508 | "numPassingAsserts": 0, 509 | "status": "passed", 510 | "title": "getPullRequestDiff" 511 | }, 512 | { 513 | "ancestorTitles": ["Peril"], 514 | "duration": 2, 515 | "failureMessages": [], 516 | "fullName": "Peril Allows setting additional headers", 517 | "numPassingAsserts": 0, 518 | "status": "passed", 519 | "title": "Allows setting additional headers" 520 | }, 521 | { 522 | "ancestorTitles": ["Peril"], 523 | "duration": 0, 524 | "failureMessages": [], 525 | "fullName": "Peril Merges two Accept headers", 526 | "numPassingAsserts": 0, 527 | "status": "passed", 528 | "title": "Merges two Accept headers" 529 | }, 530 | { 531 | "ancestorTitles": [ 532 | "Peril", 533 | "Allows setting DANGER_GITHUB_APP env variable" 534 | ], 535 | "duration": 1, 536 | "failureMessages": [], 537 | "fullName": "Peril Allows setting DANGER_GITHUB_APP env variable Makes getUserId return undefined", 538 | "numPassingAsserts": 0, 539 | "status": "passed", 540 | "title": "Makes getUserId return undefined" 541 | } 542 | ], 543 | "sourceMaps": {}, 544 | "skipped": false 545 | }, 546 | { 547 | "console": null, 548 | "failureMessage": null, 549 | "numFailingTests": 0, 550 | "numPassingTests": 3, 551 | "numPendingTests": 0, 552 | "perfStats": { "end": 1507554405556, "start": 1507554405332 }, 553 | "snapshot": { 554 | "added": 0, 555 | "fileDeleted": false, 556 | "matched": 0, 557 | "unchecked": 0, 558 | "unmatched": 0, 559 | "updated": 0 560 | }, 561 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/api/_tests/fetch.test.ts", 562 | "testResults": [ 563 | { 564 | "ancestorTitles": ["fetch"], 565 | "duration": 64, 566 | "failureMessages": [], 567 | "fullName": "fetch handles json success", 568 | "numPassingAsserts": 0, 569 | "status": "passed", 570 | "title": "handles json success" 571 | }, 572 | { 573 | "ancestorTitles": ["fetch"], 574 | "duration": 11, 575 | "failureMessages": [], 576 | "fullName": "fetch handles json error", 577 | "numPassingAsserts": 0, 578 | "status": "passed", 579 | "title": "handles json error" 580 | }, 581 | { 582 | "ancestorTitles": ["fetch"], 583 | "duration": 21, 584 | "failureMessages": [], 585 | "fullName": "fetch handles plain text error", 586 | "numPassingAsserts": 0, 587 | "status": "passed", 588 | "title": "handles plain text error" 589 | } 590 | ], 591 | "sourceMaps": {}, 592 | "skipped": false 593 | }, 594 | { 595 | "console": null, 596 | "failureMessage": null, 597 | "numFailingTests": 0, 598 | "numPassingTests": 11, 599 | "numPendingTests": 0, 600 | "perfStats": { "end": 1507554405660, "start": 1507554405453 }, 601 | "snapshot": { 602 | "added": 0, 603 | "fileDeleted": false, 604 | "matched": 0, 605 | "unchecked": 0, 606 | "unmatched": 0, 607 | "updated": 0 608 | }, 609 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_buildkite.test.ts", 610 | "testResults": [ 611 | { 612 | "ancestorTitles": ["being found when looking for CI"], 613 | "duration": 5, 614 | "failureMessages": [], 615 | "fullName": "being found when looking for CI finds Buildkite with the right ENV", 616 | "numPassingAsserts": 0, 617 | "status": "passed", 618 | "title": "finds Buildkite with the right ENV" 619 | }, 620 | { 621 | "ancestorTitles": [".isCI"], 622 | "duration": 6, 623 | "failureMessages": [], 624 | "fullName": ".isCI validates when all Buildkite environment vars are set", 625 | "numPassingAsserts": 0, 626 | "status": "passed", 627 | "title": "validates when all Buildkite environment vars are set" 628 | }, 629 | { 630 | "ancestorTitles": [".isCI"], 631 | "duration": 2, 632 | "failureMessages": [], 633 | "fullName": ".isCI does not validate without env", 634 | "numPassingAsserts": 0, 635 | "status": "passed", 636 | "title": "does not validate without env" 637 | }, 638 | { 639 | "ancestorTitles": [".isPR"], 640 | "duration": 1, 641 | "failureMessages": [], 642 | "fullName": ".isPR validates when all buildkite environment vars are set", 643 | "numPassingAsserts": 0, 644 | "status": "passed", 645 | "title": "validates when all buildkite environment vars are set" 646 | }, 647 | { 648 | "ancestorTitles": [".isPR"], 649 | "duration": 2, 650 | "failureMessages": [], 651 | "fullName": ".isPR does not validate outside of buildkite", 652 | "numPassingAsserts": 0, 653 | "status": "passed", 654 | "title": "does not validate outside of buildkite" 655 | }, 656 | { 657 | "ancestorTitles": [".isPR"], 658 | "duration": 0, 659 | "failureMessages": [], 660 | "fullName": ".isPR does not validate when BUILDKITE_PULL_REQUEST is missing", 661 | "numPassingAsserts": 0, 662 | "status": "passed", 663 | "title": "does not validate when BUILDKITE_PULL_REQUEST is missing" 664 | }, 665 | { 666 | "ancestorTitles": [".isPR"], 667 | "duration": 1, 668 | "failureMessages": [], 669 | "fullName": ".isPR does not validate when BUILDKITE_REPO is missing", 670 | "numPassingAsserts": 0, 671 | "status": "passed", 672 | "title": "does not validate when BUILDKITE_REPO is missing" 673 | }, 674 | { 675 | "ancestorTitles": [".isPR"], 676 | "duration": 1, 677 | "failureMessages": [], 678 | "fullName": ".isPR does not validate when BUILDKITE is missing", 679 | "numPassingAsserts": 0, 680 | "status": "passed", 681 | "title": "does not validate when BUILDKITE is missing" 682 | }, 683 | { 684 | "ancestorTitles": [".pullRequestID"], 685 | "duration": 1, 686 | "failureMessages": [], 687 | "fullName": ".pullRequestID pulls it out of the env", 688 | "numPassingAsserts": 0, 689 | "status": "passed", 690 | "title": "pulls it out of the env" 691 | }, 692 | { 693 | "ancestorTitles": [".repoSlug"], 694 | "duration": 2, 695 | "failureMessages": [], 696 | "fullName": ".repoSlug derives it from the repo URL", 697 | "numPassingAsserts": 0, 698 | "status": "passed", 699 | "title": "derives it from the repo URL" 700 | }, 701 | { 702 | "ancestorTitles": [".repoSlug"], 703 | "duration": 0, 704 | "failureMessages": [], 705 | "fullName": ".repoSlug derives it from the repo URL in SSH format", 706 | "numPassingAsserts": 0, 707 | "status": "passed", 708 | "title": "derives it from the repo URL in SSH format" 709 | } 710 | ], 711 | "sourceMaps": {}, 712 | "skipped": false 713 | }, 714 | { 715 | "console": null, 716 | "failureMessage": null, 717 | "numFailingTests": 0, 718 | "numPassingTests": 15, 719 | "numPendingTests": 0, 720 | "perfStats": { "end": 1507554405803, "start": 1507554405596 }, 721 | "snapshot": { 722 | "added": 0, 723 | "fileDeleted": false, 724 | "matched": 0, 725 | "unchecked": 0, 726 | "unmatched": 0, 727 | "updated": 0 728 | }, 729 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_vsts.test.ts", 730 | "testResults": [ 731 | { 732 | "ancestorTitles": ["being found when looking for CI"], 733 | "duration": 2, 734 | "failureMessages": [], 735 | "fullName": "being found when looking for CI finds VSTS with the right ENV", 736 | "numPassingAsserts": 0, 737 | "status": "passed", 738 | "title": "finds VSTS with the right ENV" 739 | }, 740 | { 741 | "ancestorTitles": [".isCI"], 742 | "duration": 0, 743 | "failureMessages": [], 744 | "fullName": ".isCI validates when all VSTS environment vars are set", 745 | "numPassingAsserts": 0, 746 | "status": "passed", 747 | "title": "validates when all VSTS environment vars are set" 748 | }, 749 | { 750 | "ancestorTitles": [".isCI"], 751 | "duration": 1, 752 | "failureMessages": [], 753 | "fullName": ".isCI does not validate without environment vars", 754 | "numPassingAsserts": 0, 755 | "status": "passed", 756 | "title": "does not validate without environment vars" 757 | }, 758 | { 759 | "ancestorTitles": [".isCI"], 760 | "duration": 0, 761 | "failureMessages": [], 762 | "fullName": ".isCI does not validate without the repository provider being set to github", 763 | "numPassingAsserts": 0, 764 | "status": "passed", 765 | "title": "does not validate without the repository provider being set to github" 766 | }, 767 | { 768 | "ancestorTitles": [".isPR"], 769 | "duration": 0, 770 | "failureMessages": [], 771 | "fullName": ".isPR validates when all VSTS environment vars are set", 772 | "numPassingAsserts": 0, 773 | "status": "passed", 774 | "title": "validates when all VSTS environment vars are set" 775 | }, 776 | { 777 | "ancestorTitles": [".isPR"], 778 | "duration": 1, 779 | "failureMessages": [], 780 | "fullName": ".isPR does not validate without environment vars", 781 | "numPassingAsserts": 0, 782 | "status": "passed", 783 | "title": "does not validate without environment vars" 784 | }, 785 | { 786 | "ancestorTitles": [".isPR"], 787 | "duration": 0, 788 | "failureMessages": [], 789 | "fullName": ".isPR does not validate when BUILD_SOURCEBRANCH is missing", 790 | "numPassingAsserts": 0, 791 | "status": "passed", 792 | "title": "does not validate when BUILD_SOURCEBRANCH is missing" 793 | }, 794 | { 795 | "ancestorTitles": [".isPR"], 796 | "duration": 0, 797 | "failureMessages": [], 798 | "fullName": ".isPR does not validate when BUILD_REPOSITORY_PROVIDER is missing", 799 | "numPassingAsserts": 0, 800 | "status": "passed", 801 | "title": "does not validate when BUILD_REPOSITORY_PROVIDER is missing" 802 | }, 803 | { 804 | "ancestorTitles": [".isPR"], 805 | "duration": 1, 806 | "failureMessages": [], 807 | "fullName": ".isPR does not validate when BUILD_REASON is missing", 808 | "numPassingAsserts": 0, 809 | "status": "passed", 810 | "title": "does not validate when BUILD_REASON is missing" 811 | }, 812 | { 813 | "ancestorTitles": [".isPR"], 814 | "duration": 0, 815 | "failureMessages": [], 816 | "fullName": ".isPR does not validate when BUILD_REPOSITORY_NAME is missing", 817 | "numPassingAsserts": 0, 818 | "status": "passed", 819 | "title": "does not validate when BUILD_REPOSITORY_NAME is missing" 820 | }, 821 | { 822 | "ancestorTitles": [".isPR"], 823 | "duration": 0, 824 | "failureMessages": [], 825 | "fullName": ".isPR needs to have a PR number", 826 | "numPassingAsserts": 0, 827 | "status": "passed", 828 | "title": "needs to have a PR number" 829 | }, 830 | { 831 | "ancestorTitles": [".isPR"], 832 | "duration": 1, 833 | "failureMessages": [], 834 | "fullName": ".isPR validates with the correct build reason", 835 | "numPassingAsserts": 0, 836 | "status": "passed", 837 | "title": "validates with the correct build reason" 838 | }, 839 | { 840 | "ancestorTitles": [".isPR"], 841 | "duration": 0, 842 | "failureMessages": [], 843 | "fullName": ".isPR does not validate without the correct build reason", 844 | "numPassingAsserts": 0, 845 | "status": "passed", 846 | "title": "does not validate without the correct build reason" 847 | }, 848 | { 849 | "ancestorTitles": [".pullRequestID"], 850 | "duration": 1, 851 | "failureMessages": [], 852 | "fullName": ".pullRequestID pulls it out of the env", 853 | "numPassingAsserts": 0, 854 | "status": "passed", 855 | "title": "pulls it out of the env" 856 | }, 857 | { 858 | "ancestorTitles": [".repoSlug"], 859 | "duration": 0, 860 | "failureMessages": [], 861 | "fullName": ".repoSlug pulls it out of the env", 862 | "numPassingAsserts": 0, 863 | "status": "passed", 864 | "title": "pulls it out of the env" 865 | } 866 | ], 867 | "sourceMaps": {}, 868 | "skipped": false 869 | }, 870 | { 871 | "console": null, 872 | "failureMessage": null, 873 | "numFailingTests": 0, 874 | "numPassingTests": 11, 875 | "numPendingTests": 0, 876 | "perfStats": { "end": 1507554405830, "start": 1507554405698 }, 877 | "snapshot": { 878 | "added": 0, 879 | "fileDeleted": false, 880 | "matched": 0, 881 | "unchecked": 0, 882 | "unmatched": 0, 883 | "updated": 0 884 | }, 885 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_buddyBuild.test.ts", 886 | "testResults": [ 887 | { 888 | "ancestorTitles": ["being found when looking for CI"], 889 | "duration": 1, 890 | "failureMessages": [], 891 | "fullName": "being found when looking for CI finds BuddyBuild with the right ENV", 892 | "numPassingAsserts": 0, 893 | "status": "passed", 894 | "title": "finds BuddyBuild with the right ENV" 895 | }, 896 | { 897 | "ancestorTitles": [".isCI"], 898 | "duration": 0, 899 | "failureMessages": [], 900 | "fullName": ".isCI validates when all BuddyBuild environment vars are set", 901 | "numPassingAsserts": 0, 902 | "status": "passed", 903 | "title": "validates when all BuddyBuild environment vars are set" 904 | }, 905 | { 906 | "ancestorTitles": [".isCI"], 907 | "duration": 0, 908 | "failureMessages": [], 909 | "fullName": ".isCI does not validate", 910 | "numPassingAsserts": 0, 911 | "status": "passed", 912 | "title": "does not validate" 913 | }, 914 | { 915 | "ancestorTitles": [".isPR"], 916 | "duration": 0, 917 | "failureMessages": [], 918 | "fullName": ".isPR validates when all BuddyBuild environment vars are set", 919 | "numPassingAsserts": 0, 920 | "status": "passed", 921 | "title": "validates when all BuddyBuild environment vars are set" 922 | }, 923 | { 924 | "ancestorTitles": [".isPR"], 925 | "duration": 0, 926 | "failureMessages": [], 927 | "fullName": ".isPR does not validate outside of BuddyBuild", 928 | "numPassingAsserts": 0, 929 | "status": "passed", 930 | "title": "does not validate outside of BuddyBuild" 931 | }, 932 | { 933 | "ancestorTitles": [".isPR"], 934 | "duration": 0, 935 | "failureMessages": [], 936 | "fullName": ".isPR does not validate when BUDDYBUILD_REPO_SLUG is missing", 937 | "numPassingAsserts": 0, 938 | "status": "passed", 939 | "title": "does not validate when BUDDYBUILD_REPO_SLUG is missing" 940 | }, 941 | { 942 | "ancestorTitles": [".isPR"], 943 | "duration": 1, 944 | "failureMessages": [], 945 | "fullName": ".isPR needs to have a PR number", 946 | "numPassingAsserts": 0, 947 | "status": "passed", 948 | "title": "needs to have a PR number" 949 | }, 950 | { 951 | "ancestorTitles": [".isPR"], 952 | "duration": 0, 953 | "failureMessages": [], 954 | "fullName": ".isPR does not validate when BUDDYBUILD_PULL_REQUEST is missing", 955 | "numPassingAsserts": 0, 956 | "status": "passed", 957 | "title": "does not validate when BUDDYBUILD_PULL_REQUEST is missing" 958 | }, 959 | { 960 | "ancestorTitles": [".isPR"], 961 | "duration": 0, 962 | "failureMessages": [], 963 | "fullName": ".isPR needs to have a PR number", 964 | "numPassingAsserts": 0, 965 | "status": "passed", 966 | "title": "needs to have a PR number" 967 | }, 968 | { 969 | "ancestorTitles": [".pullRequestID"], 970 | "duration": 0, 971 | "failureMessages": [], 972 | "fullName": ".pullRequestID pulls it out of the env", 973 | "numPassingAsserts": 0, 974 | "status": "passed", 975 | "title": "pulls it out of the env" 976 | }, 977 | { 978 | "ancestorTitles": [".repoSlug"], 979 | "duration": 1, 980 | "failureMessages": [], 981 | "fullName": ".repoSlug pulls it out of the env", 982 | "numPassingAsserts": 0, 983 | "status": "passed", 984 | "title": "pulls it out of the env" 985 | } 986 | ], 987 | "sourceMaps": {}, 988 | "skipped": false 989 | }, 990 | { 991 | "console": null, 992 | "failureMessage": null, 993 | "numFailingTests": 0, 994 | "numPassingTests": 7, 995 | "numPendingTests": 0, 996 | "perfStats": { "end": 1507554405989, "start": 1507554405878 }, 997 | "snapshot": { 998 | "added": 0, 999 | "fileDeleted": false, 1000 | "matched": 0, 1001 | "unchecked": 0, 1002 | "unmatched": 0, 1003 | "updated": 0 1004 | }, 1005 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/platforms/_tests/_github.test.ts", 1006 | "testResults": [ 1007 | { 1008 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1009 | "duration": 2, 1010 | "failureMessages": [], 1011 | "fullName": "getPlatformDSLRepresentation should return the correct review title from getReviewInfo", 1012 | "numPassingAsserts": 0, 1013 | "status": "passed", 1014 | "title": "should return the correct review title from getReviewInfo" 1015 | }, 1016 | { 1017 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1018 | "duration": 1, 1019 | "failureMessages": [], 1020 | "fullName": "getPlatformDSLRepresentation should get the issue label", 1021 | "numPassingAsserts": 0, 1022 | "status": "passed", 1023 | "title": "should get the issue label" 1024 | }, 1025 | { 1026 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1027 | "duration": 2, 1028 | "failureMessages": [], 1029 | "fullName": "getPlatformDSLRepresentation should get the commits of the pull request", 1030 | "numPassingAsserts": 0, 1031 | "status": "passed", 1032 | "title": "should get the commits of the pull request" 1033 | }, 1034 | { 1035 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1036 | "duration": 1, 1037 | "failureMessages": [], 1038 | "fullName": "getPlatformDSLRepresentation should get the reviews", 1039 | "numPassingAsserts": 0, 1040 | "status": "passed", 1041 | "title": "should get the reviews" 1042 | }, 1043 | { 1044 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1045 | "duration": 2, 1046 | "failureMessages": [], 1047 | "fullName": "getPlatformDSLRepresentation should get the reviewer requests", 1048 | "numPassingAsserts": 0, 1049 | "status": "passed", 1050 | "title": "should get the reviewer requests" 1051 | }, 1052 | { 1053 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1054 | "duration": 1, 1055 | "failureMessages": [], 1056 | "fullName": "getPlatformDSLRepresentation should get the pull request informations", 1057 | "numPassingAsserts": 0, 1058 | "status": "passed", 1059 | "title": "should get the pull request informations" 1060 | }, 1061 | { 1062 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1063 | "duration": 2, 1064 | "failureMessages": [], 1065 | "fullName": "getPlatformDSLRepresentation should set thisPR correct", 1066 | "numPassingAsserts": 0, 1067 | "status": "passed", 1068 | "title": "should set thisPR correct" 1069 | } 1070 | ], 1071 | "sourceMaps": {}, 1072 | "skipped": false 1073 | }, 1074 | { 1075 | "console": null, 1076 | "failureMessage": null, 1077 | "numFailingTests": 0, 1078 | "numPassingTests": 11, 1079 | "numPendingTests": 0, 1080 | "perfStats": { "end": 1507554405995, "start": 1507554405876 }, 1081 | "snapshot": { 1082 | "added": 0, 1083 | "fileDeleted": false, 1084 | "matched": 0, 1085 | "unchecked": 0, 1086 | "unmatched": 0, 1087 | "updated": 0 1088 | }, 1089 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_jenkins.test.ts", 1090 | "testResults": [ 1091 | { 1092 | "ancestorTitles": ["being found when looking for CI"], 1093 | "duration": 2, 1094 | "failureMessages": [], 1095 | "fullName": "being found when looking for CI finds Jenkins with the right ENV", 1096 | "numPassingAsserts": 0, 1097 | "status": "passed", 1098 | "title": "finds Jenkins with the right ENV" 1099 | }, 1100 | { 1101 | "ancestorTitles": [".isCI"], 1102 | "duration": 1, 1103 | "failureMessages": [], 1104 | "fullName": ".isCI validates when JENKINS_URL is present in environment", 1105 | "numPassingAsserts": 0, 1106 | "status": "passed", 1107 | "title": "validates when JENKINS_URL is present in environment" 1108 | }, 1109 | { 1110 | "ancestorTitles": [".isCI"], 1111 | "duration": 0, 1112 | "failureMessages": [], 1113 | "fullName": ".isCI does not validate without JENKINS_URL", 1114 | "numPassingAsserts": 0, 1115 | "status": "passed", 1116 | "title": "does not validate without JENKINS_URL" 1117 | }, 1118 | { 1119 | "ancestorTitles": [".isPR"], 1120 | "duration": 0, 1121 | "failureMessages": [], 1122 | "fullName": ".isPR validates when all Jenkins environment variables are set", 1123 | "numPassingAsserts": 0, 1124 | "status": "passed", 1125 | "title": "validates when all Jenkins environment variables are set" 1126 | }, 1127 | { 1128 | "ancestorTitles": [".isPR"], 1129 | "duration": 1, 1130 | "failureMessages": [], 1131 | "fullName": ".isPR does not validate with required environment variables", 1132 | "numPassingAsserts": 0, 1133 | "status": "passed", 1134 | "title": "does not validate with required environment variables" 1135 | }, 1136 | { 1137 | "ancestorTitles": [".isPR"], 1138 | "duration": 0, 1139 | "failureMessages": [], 1140 | "fullName": ".isPR does not validate when JENKINS_URL is missing", 1141 | "numPassingAsserts": 0, 1142 | "status": "passed", 1143 | "title": "does not validate when JENKINS_URL is missing" 1144 | }, 1145 | { 1146 | "ancestorTitles": [".isPR"], 1147 | "duration": 3, 1148 | "failureMessages": [], 1149 | "fullName": ".isPR does not validate when ghprbPullId is missing", 1150 | "numPassingAsserts": 0, 1151 | "status": "passed", 1152 | "title": "does not validate when ghprbPullId is missing" 1153 | }, 1154 | { 1155 | "ancestorTitles": [".isPR"], 1156 | "duration": 1, 1157 | "failureMessages": [], 1158 | "fullName": ".isPR does not validate when ghprbGhRepository is missing", 1159 | "numPassingAsserts": 0, 1160 | "status": "passed", 1161 | "title": "does not validate when ghprbGhRepository is missing" 1162 | }, 1163 | { 1164 | "ancestorTitles": [".isPR"], 1165 | "duration": 0, 1166 | "failureMessages": [], 1167 | "fullName": ".isPR needs to have a PR number", 1168 | "numPassingAsserts": 0, 1169 | "status": "passed", 1170 | "title": "needs to have a PR number" 1171 | }, 1172 | { 1173 | "ancestorTitles": [".pullRequestID"], 1174 | "duration": 1, 1175 | "failureMessages": [], 1176 | "fullName": ".pullRequestID pulls it out of environment", 1177 | "numPassingAsserts": 0, 1178 | "status": "passed", 1179 | "title": "pulls it out of environment" 1180 | }, 1181 | { 1182 | "ancestorTitles": [".repoSlug"], 1183 | "duration": 0, 1184 | "failureMessages": [], 1185 | "fullName": ".repoSlug pulls it out of environment", 1186 | "numPassingAsserts": 0, 1187 | "status": "passed", 1188 | "title": "pulls it out of environment" 1189 | } 1190 | ], 1191 | "sourceMaps": {}, 1192 | "skipped": false 1193 | }, 1194 | { 1195 | "console": null, 1196 | "failureMessage": null, 1197 | "numFailingTests": 0, 1198 | "numPassingTests": 10, 1199 | "numPendingTests": 0, 1200 | "perfStats": { "end": 1507554406143, "start": 1507554406025 }, 1201 | "snapshot": { 1202 | "added": 0, 1203 | "fileDeleted": false, 1204 | "matched": 0, 1205 | "unchecked": 0, 1206 | "unmatched": 0, 1207 | "updated": 0 1208 | }, 1209 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_drone.test.ts", 1210 | "testResults": [ 1211 | { 1212 | "ancestorTitles": ["being found when looking for CI"], 1213 | "duration": 2, 1214 | "failureMessages": [], 1215 | "fullName": "being found when looking for CI finds Drone with the right ENV", 1216 | "numPassingAsserts": 0, 1217 | "status": "passed", 1218 | "title": "finds Drone with the right ENV" 1219 | }, 1220 | { 1221 | "ancestorTitles": [".isCI"], 1222 | "duration": 0, 1223 | "failureMessages": [], 1224 | "fullName": ".isCI validates when all Drone environment vars are set", 1225 | "numPassingAsserts": 0, 1226 | "status": "passed", 1227 | "title": "validates when all Drone environment vars are set" 1228 | }, 1229 | { 1230 | "ancestorTitles": [".isCI"], 1231 | "duration": 1, 1232 | "failureMessages": [], 1233 | "fullName": ".isCI does not validate without DRONE", 1234 | "numPassingAsserts": 0, 1235 | "status": "passed", 1236 | "title": "does not validate without DRONE" 1237 | }, 1238 | { 1239 | "ancestorTitles": [".isPR"], 1240 | "duration": 0, 1241 | "failureMessages": [], 1242 | "fullName": ".isPR validates when all Drone environment vars are set", 1243 | "numPassingAsserts": 0, 1244 | "status": "passed", 1245 | "title": "validates when all Drone environment vars are set" 1246 | }, 1247 | { 1248 | "ancestorTitles": [".isPR"], 1249 | "duration": 0, 1250 | "failureMessages": [], 1251 | "fullName": ".isPR does not validate without DRONE_PULL_REQUEST", 1252 | "numPassingAsserts": 0, 1253 | "status": "passed", 1254 | "title": "does not validate without DRONE_PULL_REQUEST" 1255 | }, 1256 | { 1257 | "ancestorTitles": [".isPR"], 1258 | "duration": 0, 1259 | "failureMessages": [], 1260 | "fullName": ".isPR does not validate when DRONE_PULL_REQUEST is missing", 1261 | "numPassingAsserts": 0, 1262 | "status": "passed", 1263 | "title": "does not validate when DRONE_PULL_REQUEST is missing" 1264 | }, 1265 | { 1266 | "ancestorTitles": [".isPR"], 1267 | "duration": 1, 1268 | "failureMessages": [], 1269 | "fullName": ".isPR does not validate when DRONE_REPO is missing", 1270 | "numPassingAsserts": 0, 1271 | "status": "passed", 1272 | "title": "does not validate when DRONE_REPO is missing" 1273 | }, 1274 | { 1275 | "ancestorTitles": [".isPR"], 1276 | "duration": 0, 1277 | "failureMessages": [], 1278 | "fullName": ".isPR needs to have a PR number", 1279 | "numPassingAsserts": 0, 1280 | "status": "passed", 1281 | "title": "needs to have a PR number" 1282 | }, 1283 | { 1284 | "ancestorTitles": [".pullRequestID"], 1285 | "duration": 0, 1286 | "failureMessages": [], 1287 | "fullName": ".pullRequestID pulls it out of the env", 1288 | "numPassingAsserts": 0, 1289 | "status": "passed", 1290 | "title": "pulls it out of the env" 1291 | }, 1292 | { 1293 | "ancestorTitles": [".repoSlug"], 1294 | "duration": 1, 1295 | "failureMessages": [], 1296 | "fullName": ".repoSlug pulls it out of the env", 1297 | "numPassingAsserts": 0, 1298 | "status": "passed", 1299 | "title": "pulls it out of the env" 1300 | } 1301 | ], 1302 | "sourceMaps": {}, 1303 | "skipped": false 1304 | }, 1305 | { 1306 | "console": null, 1307 | "failureMessage": null, 1308 | "numFailingTests": 0, 1309 | "numPassingTests": 12, 1310 | "numPendingTests": 0, 1311 | "perfStats": { "end": 1507554406171, "start": 1507554406034 }, 1312 | "snapshot": { 1313 | "added": 0, 1314 | "fileDeleted": false, 1315 | "matched": 0, 1316 | "unchecked": 0, 1317 | "unmatched": 0, 1318 | "updated": 0 1319 | }, 1320 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_semaphore.test.ts", 1321 | "testResults": [ 1322 | { 1323 | "ancestorTitles": ["being found when looking for CI"], 1324 | "duration": 2, 1325 | "failureMessages": [], 1326 | "fullName": "being found when looking for CI finds Semaphore with the right ENV", 1327 | "numPassingAsserts": 0, 1328 | "status": "passed", 1329 | "title": "finds Semaphore with the right ENV" 1330 | }, 1331 | { 1332 | "ancestorTitles": [".isCI"], 1333 | "duration": 1, 1334 | "failureMessages": [], 1335 | "fullName": ".isCI validates when all Semaphore environment vars are set", 1336 | "numPassingAsserts": 0, 1337 | "status": "passed", 1338 | "title": "validates when all Semaphore environment vars are set" 1339 | }, 1340 | { 1341 | "ancestorTitles": [".isCI"], 1342 | "duration": 0, 1343 | "failureMessages": [], 1344 | "fullName": ".isCI does not validate without josh", 1345 | "numPassingAsserts": 0, 1346 | "status": "passed", 1347 | "title": "does not validate without josh" 1348 | }, 1349 | { 1350 | "ancestorTitles": [".isPR"], 1351 | "duration": 0, 1352 | "failureMessages": [], 1353 | "fullName": ".isPR validates when all semaphore environment vars are set", 1354 | "numPassingAsserts": 0, 1355 | "status": "passed", 1356 | "title": "validates when all semaphore environment vars are set" 1357 | }, 1358 | { 1359 | "ancestorTitles": [".isPR"], 1360 | "duration": 1, 1361 | "failureMessages": [], 1362 | "fullName": ".isPR does not validate outside of semaphore", 1363 | "numPassingAsserts": 0, 1364 | "status": "passed", 1365 | "title": "does not validate outside of semaphore" 1366 | }, 1367 | { 1368 | "ancestorTitles": [".isPR"], 1369 | "duration": 0, 1370 | "failureMessages": [], 1371 | "fullName": ".isPR does not validate when SEMAPHORE_CI_API_TOKEN is missing", 1372 | "numPassingAsserts": 0, 1373 | "status": "passed", 1374 | "title": "does not validate when SEMAPHORE_CI_API_TOKEN is missing" 1375 | }, 1376 | { 1377 | "ancestorTitles": [".isPR"], 1378 | "duration": 1, 1379 | "failureMessages": [], 1380 | "fullName": ".isPR does not validate when SEMAPHORE_PROJECT_USERNAME is missing", 1381 | "numPassingAsserts": 0, 1382 | "status": "passed", 1383 | "title": "does not validate when SEMAPHORE_PROJECT_USERNAME is missing" 1384 | }, 1385 | { 1386 | "ancestorTitles": [".isPR"], 1387 | "duration": 0, 1388 | "failureMessages": [], 1389 | "fullName": ".isPR does not validate when SEMAPHORE_PROJECT_REPONAME is missing", 1390 | "numPassingAsserts": 0, 1391 | "status": "passed", 1392 | "title": "does not validate when SEMAPHORE_PROJECT_REPONAME is missing" 1393 | }, 1394 | { 1395 | "ancestorTitles": [".isPR"], 1396 | "duration": 0, 1397 | "failureMessages": [], 1398 | "fullName": ".isPR does not validate when SEMAPHORE_BUILD_NUM is missing", 1399 | "numPassingAsserts": 0, 1400 | "status": "passed", 1401 | "title": "does not validate when SEMAPHORE_BUILD_NUM is missing" 1402 | }, 1403 | { 1404 | "ancestorTitles": [".isPR"], 1405 | "duration": 1, 1406 | "failureMessages": [], 1407 | "fullName": ".isPR needs to have a PR number", 1408 | "numPassingAsserts": 0, 1409 | "status": "passed", 1410 | "title": "needs to have a PR number" 1411 | }, 1412 | { 1413 | "ancestorTitles": [".pullRequestID"], 1414 | "duration": 0, 1415 | "failureMessages": [], 1416 | "fullName": ".pullRequestID pulls it out of the env", 1417 | "numPassingAsserts": 0, 1418 | "status": "passed", 1419 | "title": "pulls it out of the env" 1420 | }, 1421 | { 1422 | "ancestorTitles": [".repoSlug"], 1423 | "duration": 1, 1424 | "failureMessages": [], 1425 | "fullName": ".repoSlug derives it from the PR Url", 1426 | "numPassingAsserts": 0, 1427 | "status": "passed", 1428 | "title": "derives it from the PR Url" 1429 | } 1430 | ], 1431 | "sourceMaps": {}, 1432 | "skipped": false 1433 | }, 1434 | { 1435 | "console": null, 1436 | "failureMessage": null, 1437 | "numFailingTests": 0, 1438 | "numPassingTests": 3, 1439 | "numPendingTests": 0, 1440 | "perfStats": { "end": 1507554406319, "start": 1507554406185 }, 1441 | "snapshot": { 1442 | "added": 0, 1443 | "fileDeleted": false, 1444 | "matched": 0, 1445 | "unchecked": 0, 1446 | "unmatched": 0, 1447 | "updated": 0 1448 | }, 1449 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/platforms/github/_tests/_pull_request_parser.test.ts", 1450 | "testResults": [ 1451 | { 1452 | "ancestorTitles": ["parsing urls"], 1453 | "duration": 3, 1454 | "failureMessages": [], 1455 | "fullName": "parsing urls handles bad data", 1456 | "numPassingAsserts": 0, 1457 | "status": "passed", 1458 | "title": "handles bad data" 1459 | }, 1460 | { 1461 | "ancestorTitles": ["parsing urls"], 1462 | "duration": 1, 1463 | "failureMessages": [], 1464 | "fullName": "parsing urls pulls out the repo / pr ID", 1465 | "numPassingAsserts": 0, 1466 | "status": "passed", 1467 | "title": "pulls out the repo / pr ID" 1468 | }, 1469 | { 1470 | "ancestorTitles": ["parsing urls"], 1471 | "duration": 0, 1472 | "failureMessages": [], 1473 | "fullName": "parsing urls handles query params too", 1474 | "numPassingAsserts": 0, 1475 | "status": "passed", 1476 | "title": "handles query params too" 1477 | } 1478 | ], 1479 | "sourceMaps": {}, 1480 | "skipped": false 1481 | }, 1482 | { 1483 | "console": null, 1484 | "failureMessage": null, 1485 | "numFailingTests": 0, 1486 | "numPassingTests": 13, 1487 | "numPendingTests": 0, 1488 | "perfStats": { "end": 1507554406396, "start": 1507554406208 }, 1489 | "snapshot": { 1490 | "added": 0, 1491 | "fileDeleted": false, 1492 | "matched": 0, 1493 | "unchecked": 0, 1494 | "unmatched": 0, 1495 | "updated": 0 1496 | }, 1497 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_circle.test.ts", 1498 | "testResults": [ 1499 | { 1500 | "ancestorTitles": ["being found when looking for CI"], 1501 | "duration": 2, 1502 | "failureMessages": [], 1503 | "fullName": "being found when looking for CI finds Circle with the right ENV", 1504 | "numPassingAsserts": 0, 1505 | "status": "passed", 1506 | "title": "finds Circle with the right ENV" 1507 | }, 1508 | { 1509 | "ancestorTitles": [".isCI"], 1510 | "duration": 1, 1511 | "failureMessages": [], 1512 | "fullName": ".isCI validates when all Circle environment vars are set", 1513 | "numPassingAsserts": 0, 1514 | "status": "passed", 1515 | "title": "validates when all Circle environment vars are set" 1516 | }, 1517 | { 1518 | "ancestorTitles": [".isCI"], 1519 | "duration": 0, 1520 | "failureMessages": [], 1521 | "fullName": ".isCI does not validate without josh", 1522 | "numPassingAsserts": 0, 1523 | "status": "passed", 1524 | "title": "does not validate without josh" 1525 | }, 1526 | { 1527 | "ancestorTitles": [".isPR"], 1528 | "duration": 1, 1529 | "failureMessages": [], 1530 | "fullName": ".isPR validates when all circle environment vars are set", 1531 | "numPassingAsserts": 0, 1532 | "status": "passed", 1533 | "title": "validates when all circle environment vars are set" 1534 | }, 1535 | { 1536 | "ancestorTitles": [".isPR"], 1537 | "duration": 0, 1538 | "failureMessages": [], 1539 | "fullName": ".isPR does not validate outside of circle", 1540 | "numPassingAsserts": 0, 1541 | "status": "passed", 1542 | "title": "does not validate outside of circle" 1543 | }, 1544 | { 1545 | "ancestorTitles": [".isPR"], 1546 | "duration": 0, 1547 | "failureMessages": [], 1548 | "fullName": ".isPR does not validate when CIRCLE_CI_API_TOKEN is missing", 1549 | "numPassingAsserts": 0, 1550 | "status": "passed", 1551 | "title": "does not validate when CIRCLE_CI_API_TOKEN is missing" 1552 | }, 1553 | { 1554 | "ancestorTitles": [".isPR"], 1555 | "duration": 0, 1556 | "failureMessages": [], 1557 | "fullName": ".isPR does not validate when CIRCLE_PROJECT_USERNAME is missing", 1558 | "numPassingAsserts": 0, 1559 | "status": "passed", 1560 | "title": "does not validate when CIRCLE_PROJECT_USERNAME is missing" 1561 | }, 1562 | { 1563 | "ancestorTitles": [".isPR"], 1564 | "duration": 1, 1565 | "failureMessages": [], 1566 | "fullName": ".isPR does not validate when CIRCLE_PROJECT_REPONAME is missing", 1567 | "numPassingAsserts": 0, 1568 | "status": "passed", 1569 | "title": "does not validate when CIRCLE_PROJECT_REPONAME is missing" 1570 | }, 1571 | { 1572 | "ancestorTitles": [".isPR"], 1573 | "duration": 0, 1574 | "failureMessages": [], 1575 | "fullName": ".isPR does not validate when CIRCLE_BUILD_NUM is missing", 1576 | "numPassingAsserts": 0, 1577 | "status": "passed", 1578 | "title": "does not validate when CIRCLE_BUILD_NUM is missing" 1579 | }, 1580 | { 1581 | "ancestorTitles": [".isPR"], 1582 | "duration": 1, 1583 | "failureMessages": [], 1584 | "fullName": ".isPR needs to have a PR number", 1585 | "numPassingAsserts": 0, 1586 | "status": "passed", 1587 | "title": "needs to have a PR number" 1588 | }, 1589 | { 1590 | "ancestorTitles": [".pullRequestID"], 1591 | "duration": 0, 1592 | "failureMessages": [], 1593 | "fullName": ".pullRequestID pulls it out of the env", 1594 | "numPassingAsserts": 0, 1595 | "status": "passed", 1596 | "title": "pulls it out of the env" 1597 | }, 1598 | { 1599 | "ancestorTitles": [".pullRequestID"], 1600 | "duration": 1, 1601 | "failureMessages": [], 1602 | "fullName": ".pullRequestID can derive it from PR Url", 1603 | "numPassingAsserts": 0, 1604 | "status": "passed", 1605 | "title": "can derive it from PR Url" 1606 | }, 1607 | { 1608 | "ancestorTitles": [".repoSlug"], 1609 | "duration": 0, 1610 | "failureMessages": [], 1611 | "fullName": ".repoSlug derives it from the PR Url", 1612 | "numPassingAsserts": 0, 1613 | "status": "passed", 1614 | "title": "derives it from the PR Url" 1615 | } 1616 | ], 1617 | "sourceMaps": {}, 1618 | "skipped": false 1619 | }, 1620 | { 1621 | "console": null, 1622 | "failureMessage": null, 1623 | "numFailingTests": 0, 1624 | "numPassingTests": 10, 1625 | "numPendingTests": 0, 1626 | "perfStats": { "end": 1507554406488, "start": 1507554406350 }, 1627 | "snapshot": { 1628 | "added": 0, 1629 | "fileDeleted": false, 1630 | "matched": 0, 1631 | "unchecked": 0, 1632 | "unmatched": 0, 1633 | "updated": 0 1634 | }, 1635 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_dockerCloud.test.ts", 1636 | "testResults": [ 1637 | { 1638 | "ancestorTitles": ["being found when looking for CI"], 1639 | "duration": 3, 1640 | "failureMessages": [], 1641 | "fullName": "being found when looking for CI finds DockerCloud with the right ENV", 1642 | "numPassingAsserts": 0, 1643 | "status": "passed", 1644 | "title": "finds DockerCloud with the right ENV" 1645 | }, 1646 | { 1647 | "ancestorTitles": [".isCI"], 1648 | "duration": 3, 1649 | "failureMessages": [], 1650 | "fullName": ".isCI validates when all DockerCloud environment vars are set", 1651 | "numPassingAsserts": 0, 1652 | "status": "passed", 1653 | "title": "validates when all DockerCloud environment vars are set" 1654 | }, 1655 | { 1656 | "ancestorTitles": [".isCI"], 1657 | "duration": 2, 1658 | "failureMessages": [], 1659 | "fullName": ".isCI does not validate without env", 1660 | "numPassingAsserts": 0, 1661 | "status": "passed", 1662 | "title": "does not validate without env" 1663 | }, 1664 | { 1665 | "ancestorTitles": [".isPR"], 1666 | "duration": 1, 1667 | "failureMessages": [], 1668 | "fullName": ".isPR validates when all dockerCloud environment vars are set", 1669 | "numPassingAsserts": 0, 1670 | "status": "passed", 1671 | "title": "validates when all dockerCloud environment vars are set" 1672 | }, 1673 | { 1674 | "ancestorTitles": [".isPR"], 1675 | "duration": 1, 1676 | "failureMessages": [], 1677 | "fullName": ".isPR does not validate outside of dockerCloud", 1678 | "numPassingAsserts": 0, 1679 | "status": "passed", 1680 | "title": "does not validate outside of dockerCloud" 1681 | }, 1682 | { 1683 | "ancestorTitles": [".isPR"], 1684 | "duration": 2, 1685 | "failureMessages": [], 1686 | "fullName": ".isPR does not validate when PULL_REQUEST_URL is missing", 1687 | "numPassingAsserts": 0, 1688 | "status": "passed", 1689 | "title": "does not validate when PULL_REQUEST_URL is missing" 1690 | }, 1691 | { 1692 | "ancestorTitles": [".isPR"], 1693 | "duration": 0, 1694 | "failureMessages": [], 1695 | "fullName": ".isPR does not validate when SOURCE_REPOSITORY_URL is missing", 1696 | "numPassingAsserts": 0, 1697 | "status": "passed", 1698 | "title": "does not validate when SOURCE_REPOSITORY_URL is missing" 1699 | }, 1700 | { 1701 | "ancestorTitles": [".isPR"], 1702 | "duration": 1, 1703 | "failureMessages": [], 1704 | "fullName": ".isPR does not validate when DOCKER_REPO is missing", 1705 | "numPassingAsserts": 0, 1706 | "status": "passed", 1707 | "title": "does not validate when DOCKER_REPO is missing" 1708 | }, 1709 | { 1710 | "ancestorTitles": [".pullRequestID"], 1711 | "duration": 1, 1712 | "failureMessages": [], 1713 | "fullName": ".pullRequestID pulls it out of the env", 1714 | "numPassingAsserts": 0, 1715 | "status": "passed", 1716 | "title": "pulls it out of the env" 1717 | }, 1718 | { 1719 | "ancestorTitles": [".repoSlug"], 1720 | "duration": 1, 1721 | "failureMessages": [], 1722 | "fullName": ".repoSlug derives it from the PR Url", 1723 | "numPassingAsserts": 0, 1724 | "status": "passed", 1725 | "title": "derives it from the PR Url" 1726 | } 1727 | ], 1728 | "sourceMaps": {}, 1729 | "skipped": false 1730 | }, 1731 | { 1732 | "console": null, 1733 | "failureMessage": null, 1734 | "numFailingTests": 0, 1735 | "numPassingTests": 4, 1736 | "numPendingTests": 0, 1737 | "perfStats": { "end": 1507554406659, "start": 1507554406468 }, 1738 | "snapshot": { 1739 | "added": 0, 1740 | "fileDeleted": false, 1741 | "matched": 0, 1742 | "unchecked": 0, 1743 | "unmatched": 0, 1744 | "updated": 0 1745 | }, 1746 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/_tests/_get_ci_source.test.ts", 1747 | "testResults": [ 1748 | { 1749 | "ancestorTitles": [".getCISourceForEnv"], 1750 | "duration": 2, 1751 | "failureMessages": [], 1752 | "fullName": ".getCISourceForEnv returns undefined if nothing is found", 1753 | "numPassingAsserts": 0, 1754 | "status": "passed", 1755 | "title": "returns undefined if nothing is found" 1756 | }, 1757 | { 1758 | "ancestorTitles": [".getCISourceForEnv"], 1759 | "duration": 1, 1760 | "failureMessages": [], 1761 | "fullName": ".getCISourceForEnv falls back to the fake if DANGER_FAKE_CI exists", 1762 | "numPassingAsserts": 0, 1763 | "status": "passed", 1764 | "title": "falls back to the fake if DANGER_FAKE_CI exists" 1765 | }, 1766 | { 1767 | "ancestorTitles": [".getCISourceForExternal"], 1768 | "duration": 2, 1769 | "failureMessages": [], 1770 | "fullName": ".getCISourceForExternal should resolve module relatively", 1771 | "numPassingAsserts": 0, 1772 | "status": "passed", 1773 | "title": "should resolve module relatively" 1774 | }, 1775 | { 1776 | "ancestorTitles": [".getCISourceForExternal"], 1777 | "duration": 2, 1778 | "failureMessages": [], 1779 | "fullName": ".getCISourceForExternal should return undefined if module resolution fails", 1780 | "numPassingAsserts": 0, 1781 | "status": "passed", 1782 | "title": "should return undefined if module resolution fails" 1783 | } 1784 | ], 1785 | "sourceMaps": {}, 1786 | "skipped": false 1787 | }, 1788 | { 1789 | "console": null, 1790 | "failureMessage": null, 1791 | "numFailingTests": 0, 1792 | "numPassingTests": 10, 1793 | "numPendingTests": 0, 1794 | "perfStats": { "end": 1507554406677, "start": 1507554406538 }, 1795 | "snapshot": { 1796 | "added": 0, 1797 | "fileDeleted": false, 1798 | "matched": 0, 1799 | "unchecked": 0, 1800 | "unmatched": 0, 1801 | "updated": 0 1802 | }, 1803 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/ci_source/providers/_tests/_travis.test.ts", 1804 | "testResults": [ 1805 | { 1806 | "ancestorTitles": ["being found when looking for CI"], 1807 | "duration": 3, 1808 | "failureMessages": [], 1809 | "fullName": "being found when looking for CI finds Travis with the right ENV", 1810 | "numPassingAsserts": 0, 1811 | "status": "passed", 1812 | "title": "finds Travis with the right ENV" 1813 | }, 1814 | { 1815 | "ancestorTitles": [".isCI"], 1816 | "duration": 1, 1817 | "failureMessages": [], 1818 | "fullName": ".isCI validates when all Travis environment vars are set and Josh K says so", 1819 | "numPassingAsserts": 0, 1820 | "status": "passed", 1821 | "title": "validates when all Travis environment vars are set and Josh K says so" 1822 | }, 1823 | { 1824 | "ancestorTitles": [".isCI"], 1825 | "duration": 0, 1826 | "failureMessages": [], 1827 | "fullName": ".isCI does not validate without josh", 1828 | "numPassingAsserts": 0, 1829 | "status": "passed", 1830 | "title": "does not validate without josh" 1831 | }, 1832 | { 1833 | "ancestorTitles": [".isPR"], 1834 | "duration": 0, 1835 | "failureMessages": [], 1836 | "fullName": ".isPR validates when all Travis environment vars are set and Josh K says so", 1837 | "numPassingAsserts": 0, 1838 | "status": "passed", 1839 | "title": "validates when all Travis environment vars are set and Josh K says so" 1840 | }, 1841 | { 1842 | "ancestorTitles": [".isPR"], 1843 | "duration": 0, 1844 | "failureMessages": [], 1845 | "fullName": ".isPR does not validate without josh", 1846 | "numPassingAsserts": 0, 1847 | "status": "passed", 1848 | "title": "does not validate without josh" 1849 | }, 1850 | { 1851 | "ancestorTitles": [".isPR"], 1852 | "duration": 1, 1853 | "failureMessages": [], 1854 | "fullName": ".isPR does not validate when TRAVIS_PULL_REQUEST is missing", 1855 | "numPassingAsserts": 0, 1856 | "status": "passed", 1857 | "title": "does not validate when TRAVIS_PULL_REQUEST is missing" 1858 | }, 1859 | { 1860 | "ancestorTitles": [".isPR"], 1861 | "duration": 1, 1862 | "failureMessages": [], 1863 | "fullName": ".isPR does not validate when TRAVIS_REPO_SLUG is missing", 1864 | "numPassingAsserts": 0, 1865 | "status": "passed", 1866 | "title": "does not validate when TRAVIS_REPO_SLUG is missing" 1867 | }, 1868 | { 1869 | "ancestorTitles": [".isPR"], 1870 | "duration": 1, 1871 | "failureMessages": [], 1872 | "fullName": ".isPR needs to have a PR number", 1873 | "numPassingAsserts": 0, 1874 | "status": "passed", 1875 | "title": "needs to have a PR number" 1876 | }, 1877 | { 1878 | "ancestorTitles": [".pullRequestID"], 1879 | "duration": 1, 1880 | "failureMessages": [], 1881 | "fullName": ".pullRequestID pulls it out of the env", 1882 | "numPassingAsserts": 0, 1883 | "status": "passed", 1884 | "title": "pulls it out of the env" 1885 | }, 1886 | { 1887 | "ancestorTitles": [".repoSlug"], 1888 | "duration": 0, 1889 | "failureMessages": [], 1890 | "fullName": ".repoSlug pulls it out of the env", 1891 | "numPassingAsserts": 0, 1892 | "status": "passed", 1893 | "title": "pulls it out of the env" 1894 | } 1895 | ], 1896 | "sourceMaps": {}, 1897 | "skipped": false 1898 | }, 1899 | { 1900 | "console": null, 1901 | "failureMessage": null, 1902 | "numFailingTests": 0, 1903 | "numPassingTests": 7, 1904 | "numPendingTests": 0, 1905 | "perfStats": { "end": 1507554406834, "start": 1507554406695 }, 1906 | "snapshot": { 1907 | "added": 0, 1908 | "fileDeleted": false, 1909 | "matched": 1, 1910 | "unchecked": 0, 1911 | "unmatched": 0, 1912 | "updated": 0 1913 | }, 1914 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/runner/templates/_tests/_githubIssueTemplates.test.ts", 1915 | "testResults": [ 1916 | { 1917 | "ancestorTitles": ["generating messages"], 1918 | "duration": 4, 1919 | "failureMessages": [], 1920 | "fullName": "generating messages shows no tables for empty results", 1921 | "numPassingAsserts": 0, 1922 | "status": "passed", 1923 | "title": "shows no tables for empty results" 1924 | }, 1925 | { 1926 | "ancestorTitles": ["generating messages"], 1927 | "duration": 1, 1928 | "failureMessages": [], 1929 | "fullName": "generating messages shows no tables for results without messages", 1930 | "numPassingAsserts": 0, 1931 | "status": "passed", 1932 | "title": "shows no tables for results without messages" 1933 | }, 1934 | { 1935 | "ancestorTitles": ["generating messages"], 1936 | "duration": 9, 1937 | "failureMessages": [], 1938 | "fullName": "generating messages Shows the failing messages in a table", 1939 | "numPassingAsserts": 0, 1940 | "status": "passed", 1941 | "title": "Shows the failing messages in a table" 1942 | }, 1943 | { 1944 | "ancestorTitles": ["generating messages"], 1945 | "duration": 1, 1946 | "failureMessages": [], 1947 | "fullName": "generating messages Shows the warning messages in a table", 1948 | "numPassingAsserts": 0, 1949 | "status": "passed", 1950 | "title": "Shows the warning messages in a table" 1951 | }, 1952 | { 1953 | "ancestorTitles": ["generating messages"], 1954 | "duration": 2, 1955 | "failureMessages": [], 1956 | "fullName": "generating messages does not break commonmark rules around line breaks", 1957 | "numPassingAsserts": 0, 1958 | "status": "passed", 1959 | "title": "does not break commonmark rules around line breaks" 1960 | }, 1961 | { 1962 | "ancestorTitles": ["generating messages"], 1963 | "duration": 0, 1964 | "failureMessages": [], 1965 | "fullName": "generating messages Should include summary on top of message", 1966 | "numPassingAsserts": 0, 1967 | "status": "passed", 1968 | "title": "Should include summary on top of message" 1969 | }, 1970 | { 1971 | "ancestorTitles": ["generating messages"], 1972 | "duration": 0, 1973 | "failureMessages": [], 1974 | "fullName": "generating messages leaves space between s to allow GitHub to render message content as markdown", 1975 | "numPassingAsserts": 0, 1976 | "status": "passed", 1977 | "title": "leaves space between s to allow GitHub to render message content as markdown" 1978 | } 1979 | ], 1980 | "sourceMaps": {}, 1981 | "skipped": false 1982 | }, 1983 | { 1984 | "console": null, 1985 | "failureMessage": null, 1986 | "numFailingTests": 0, 1987 | "numPassingTests": 8, 1988 | "numPendingTests": 0, 1989 | "perfStats": { "end": 1507554406863, "start": 1507554406740 }, 1990 | "snapshot": { 1991 | "added": 0, 1992 | "fileDeleted": false, 1993 | "matched": 0, 1994 | "unchecked": 0, 1995 | "unmatched": 0, 1996 | "updated": 0 1997 | }, 1998 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/runner/_tests/_danger_utils.test.ts", 1999 | "testResults": [ 2000 | { 2001 | "ancestorTitles": ["sentence()"], 2002 | "duration": 2, 2003 | "failureMessages": [], 2004 | "fullName": "sentence() handles falsy input", 2005 | "numPassingAsserts": 0, 2006 | "status": "passed", 2007 | "title": "handles falsy input" 2008 | }, 2009 | { 2010 | "ancestorTitles": ["sentence()"], 2011 | "duration": 0, 2012 | "failureMessages": [], 2013 | "fullName": "sentence() handles empty array", 2014 | "numPassingAsserts": 0, 2015 | "status": "passed", 2016 | "title": "handles empty array" 2017 | }, 2018 | { 2019 | "ancestorTitles": ["sentence()"], 2020 | "duration": 0, 2021 | "failureMessages": [], 2022 | "fullName": "sentence() handles array with one item", 2023 | "numPassingAsserts": 0, 2024 | "status": "passed", 2025 | "title": "handles array with one item" 2026 | }, 2027 | { 2028 | "ancestorTitles": ["sentence()"], 2029 | "duration": 0, 2030 | "failureMessages": [], 2031 | "fullName": "sentence() handles array with multiple items", 2032 | "numPassingAsserts": 0, 2033 | "status": "passed", 2034 | "title": "handles array with multiple items" 2035 | }, 2036 | { 2037 | "ancestorTitles": ["href()"], 2038 | "duration": 1, 2039 | "failureMessages": [], 2040 | "fullName": "href() returns null when href and text are falsy", 2041 | "numPassingAsserts": 0, 2042 | "status": "passed", 2043 | "title": "returns null when href and text are falsy" 2044 | }, 2045 | { 2046 | "ancestorTitles": ["href()"], 2047 | "duration": 0, 2048 | "failureMessages": [], 2049 | "fullName": "href() returns just the text when the href is missing", 2050 | "numPassingAsserts": 0, 2051 | "status": "passed", 2052 | "title": "returns just the text when the href is missing" 2053 | }, 2054 | { 2055 | "ancestorTitles": ["href()"], 2056 | "duration": 1, 2057 | "failureMessages": [], 2058 | "fullName": "href() returns tag with href as text when text is missing", 2059 | "numPassingAsserts": 0, 2060 | "status": "passed", 2061 | "title": "returns tag with href as text when text is missing" 2062 | }, 2063 | { 2064 | "ancestorTitles": ["href()"], 2065 | "duration": 0, 2066 | "failureMessages": [], 2067 | "fullName": "href() returns tag for supplied href and text", 2068 | "numPassingAsserts": 0, 2069 | "status": "passed", 2070 | "title": "returns tag for supplied href and text" 2071 | } 2072 | ], 2073 | "sourceMaps": {}, 2074 | "skipped": false 2075 | }, 2076 | { 2077 | "console": null, 2078 | "failureMessage": null, 2079 | "numFailingTests": 0, 2080 | "numPassingTests": 4, 2081 | "numPendingTests": 0, 2082 | "perfStats": { "end": 1507554406991, "start": 1507554406914 }, 2083 | "snapshot": { 2084 | "added": 0, 2085 | "fileDeleted": false, 2086 | "matched": 0, 2087 | "unchecked": 0, 2088 | "unmatched": 0, 2089 | "updated": 0 2090 | }, 2091 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/platforms/github/_tests/_github_utils.test.ts", 2092 | "testResults": [ 2093 | { 2094 | "ancestorTitles": ["fileLinks"], 2095 | "duration": 1, 2096 | "failureMessages": [], 2097 | "fullName": "fileLinks Should convert a few paths into links", 2098 | "numPassingAsserts": 0, 2099 | "status": "passed", 2100 | "title": "Should convert a few paths into links" 2101 | }, 2102 | { 2103 | "ancestorTitles": ["fileLinks"], 2104 | "duration": 1, 2105 | "failureMessages": [], 2106 | "fullName": "fileLinks Should convert a few paths into links showing full links", 2107 | "numPassingAsserts": 0, 2108 | "status": "passed", 2109 | "title": "Should convert a few paths into links showing full links" 2110 | }, 2111 | { 2112 | "ancestorTitles": ["fileLinks"], 2113 | "duration": 0, 2114 | "failureMessages": [], 2115 | "fullName": "fileLinks Should convert a few paths into links showing full link on a custom fork/branch", 2116 | "numPassingAsserts": 0, 2117 | "status": "passed", 2118 | "title": "Should convert a few paths into links showing full link on a custom fork/branch" 2119 | }, 2120 | { 2121 | "ancestorTitles": ["getContents"], 2122 | "duration": 6, 2123 | "failureMessages": [], 2124 | "fullName": "getContents should call the API's getContents", 2125 | "numPassingAsserts": 0, 2126 | "status": "passed", 2127 | "title": "should call the API's getContents" 2128 | } 2129 | ], 2130 | "sourceMaps": {}, 2131 | "skipped": false 2132 | }, 2133 | { 2134 | "console": null, 2135 | "failureMessage": null, 2136 | "numFailingTests": 0, 2137 | "numPassingTests": 1, 2138 | "numPendingTests": 0, 2139 | "perfStats": { "end": 1507554407016, "start": 1507554406860 }, 2140 | "snapshot": { 2141 | "added": 0, 2142 | "fileDeleted": false, 2143 | "matched": 0, 2144 | "unchecked": 0, 2145 | "unmatched": 0, 2146 | "updated": 0 2147 | }, 2148 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/platforms/_tests/_platform.test.ts", 2149 | "testResults": [ 2150 | { 2151 | "ancestorTitles": [], 2152 | "duration": 6, 2153 | "failureMessages": [], 2154 | "fullName": "should bail if there is no DANGER_GITHUB_API_TOKEN found", 2155 | "numPassingAsserts": 0, 2156 | "status": "passed", 2157 | "title": "should bail if there is no DANGER_GITHUB_API_TOKEN found" 2158 | } 2159 | ], 2160 | "sourceMaps": {}, 2161 | "skipped": false 2162 | }, 2163 | { 2164 | "console": null, 2165 | "failureMessage": null, 2166 | "numFailingTests": 0, 2167 | "numPassingTests": 15, 2168 | "numPendingTests": 0, 2169 | "perfStats": { "end": 1507554407860, "start": 1507554403103 }, 2170 | "snapshot": { 2171 | "added": 0, 2172 | "fileDeleted": false, 2173 | "matched": 0, 2174 | "unchecked": 0, 2175 | "unmatched": 0, 2176 | "updated": 0 2177 | }, 2178 | "testFilePath": "/Users/orta/dev/projects/danger/danger-js/source/runner/_tests/_danger_runner.test.ts", 2179 | "testResults": [ 2180 | { 2181 | "ancestorTitles": ["with fixtures"], 2182 | "duration": 2042, 2183 | "failureMessages": [], 2184 | "fullName": "with fixtures handles a blank Dangerfile", 2185 | "numPassingAsserts": 0, 2186 | "status": "passed", 2187 | "title": "handles a blank Dangerfile" 2188 | }, 2189 | { 2190 | "ancestorTitles": ["with fixtures"], 2191 | "duration": 30, 2192 | "failureMessages": [], 2193 | "fullName": "with fixtures handles a full set of messages", 2194 | "numPassingAsserts": 0, 2195 | "status": "passed", 2196 | "title": "handles a full set of messages" 2197 | }, 2198 | { 2199 | "ancestorTitles": ["with fixtures"], 2200 | "duration": 28, 2201 | "failureMessages": [], 2202 | "fullName": "with fixtures handles a failing dangerfile", 2203 | "numPassingAsserts": 0, 2204 | "status": "passed", 2205 | "title": "handles a failing dangerfile" 2206 | }, 2207 | { 2208 | "ancestorTitles": ["with fixtures"], 2209 | "duration": 45, 2210 | "failureMessages": [], 2211 | "fullName": "with fixtures handles relative imports correctly in Babel", 2212 | "numPassingAsserts": 0, 2213 | "status": "passed", 2214 | "title": "handles relative imports correctly in Babel" 2215 | }, 2216 | { 2217 | "ancestorTitles": ["with fixtures"], 2218 | "duration": 56, 2219 | "failureMessages": [], 2220 | "fullName": "with fixtures handles scheduled (async) code", 2221 | "numPassingAsserts": 0, 2222 | "status": "passed", 2223 | "title": "handles scheduled (async) code" 2224 | }, 2225 | { 2226 | "ancestorTitles": ["with fixtures"], 2227 | "duration": 158, 2228 | "failureMessages": [], 2229 | "fullName": "with fixtures handles multiple scheduled statements and all message types", 2230 | "numPassingAsserts": 0, 2231 | "status": "passed", 2232 | "title": "handles multiple scheduled statements and all message types" 2233 | }, 2234 | { 2235 | "ancestorTitles": ["with fixtures"], 2236 | "duration": 80, 2237 | "failureMessages": [], 2238 | "fullName": "with fixtures in Typescript it handles multiple scheduled statements and all message types", 2239 | "numPassingAsserts": 0, 2240 | "status": "passed", 2241 | "title": "in Typescript it handles multiple scheduled statements and all message types" 2242 | }, 2243 | { 2244 | "ancestorTitles": ["with fixtures"], 2245 | "duration": 96, 2246 | "failureMessages": [], 2247 | "fullName": "with fixtures in babel it can execute async/await scheduled functions", 2248 | "numPassingAsserts": 0, 2249 | "status": "passed", 2250 | "title": "in babel it can execute async/await scheduled functions" 2251 | }, 2252 | { 2253 | "ancestorTitles": ["with fixtures"], 2254 | "duration": 71, 2255 | "failureMessages": [], 2256 | "fullName": "with fixtures in typescript it can execute async/await scheduled functions", 2257 | "numPassingAsserts": 0, 2258 | "status": "passed", 2259 | "title": "in typescript it can execute async/await scheduled functions" 2260 | }, 2261 | { 2262 | "ancestorTitles": ["with fixtures"], 2263 | "duration": 22, 2264 | "failureMessages": [], 2265 | "fullName": "with fixtures can schedule callback-based promised ", 2266 | "numPassingAsserts": 0, 2267 | "status": "passed", 2268 | "title": "can schedule callback-based promised " 2269 | }, 2270 | { 2271 | "ancestorTitles": ["with fixtures"], 2272 | "duration": 20, 2273 | "failureMessages": [], 2274 | "fullName": "with fixtures can handle TypeScript based Dangerfiles", 2275 | "numPassingAsserts": 0, 2276 | "status": "passed", 2277 | "title": "can handle TypeScript based Dangerfiles" 2278 | }, 2279 | { 2280 | "ancestorTitles": ["with fixtures"], 2281 | "duration": 170, 2282 | "failureMessages": [], 2283 | "fullName": "with fixtures can handle a plugin (which is already used in Danger)", 2284 | "numPassingAsserts": 0, 2285 | "status": "passed", 2286 | "title": "can handle a plugin (which is already used in Danger)" 2287 | }, 2288 | { 2289 | "ancestorTitles": ["with fixtures"], 2290 | "duration": 17, 2291 | "failureMessages": [], 2292 | "fullName": "with fixtures does not swallow errors thrown in Dangerfile", 2293 | "numPassingAsserts": 0, 2294 | "status": "passed", 2295 | "title": "does not swallow errors thrown in Dangerfile" 2296 | }, 2297 | { 2298 | "ancestorTitles": ["cleaning Dangerfiles"], 2299 | "duration": 1, 2300 | "failureMessages": [], 2301 | "fullName": "cleaning Dangerfiles also handles typescript style imports", 2302 | "numPassingAsserts": 0, 2303 | "status": "passed", 2304 | "title": "also handles typescript style imports" 2305 | }, 2306 | { 2307 | "ancestorTitles": ["cleaning Dangerfiles"], 2308 | "duration": 0, 2309 | "failureMessages": [], 2310 | "fullName": "cleaning Dangerfiles also handles require style imports", 2311 | "numPassingAsserts": 0, 2312 | "status": "passed", 2313 | "title": "also handles require style imports" 2314 | } 2315 | ], 2316 | "sourceMaps": {}, 2317 | "skipped": false 2318 | } 2319 | ], 2320 | "wasInterrupted": false 2321 | } 2322 | -------------------------------------------------------------------------------- /src/__tests__/__fixtures__/passing-tests.json: -------------------------------------------------------------------------------- 1 | { 2 | "numFailedTestSuites": 0, 3 | "numFailedTests": 0, 4 | "numPassedTestSuites": 19, 5 | "numPassedTests": 153, 6 | "numPendingTestSuites": 0, 7 | "numPendingTests": 0, 8 | "numRuntimeErrorTestSuites": 0, 9 | "numTotalTestSuites": 19, 10 | "numTotalTests": 153, 11 | "snapshot": { 12 | "added": 0, 13 | "didUpdate": false, 14 | "failure": false, 15 | "filesAdded": 0, 16 | "filesRemoved": 0, 17 | "filesUnmatched": 0, 18 | "filesUpdated": 0, 19 | "matched": 7, 20 | "total": 7, 21 | "unchecked": 0, 22 | "unmatched": 0, 23 | "updated": 0 24 | }, 25 | "startTime": 1495637916472, 26 | "success": true, 27 | "testResults": [ 28 | { 29 | "console": null, 30 | "failureMessage": null, 31 | "numFailingTests": 0, 32 | "numPassingTests": 13, 33 | "numPendingTests": 0, 34 | "perfStats": { 35 | "end": 1495637919555, 36 | "start": 1495637917967 37 | }, 38 | "snapshot": { 39 | "added": 0, 40 | "fileDeleted": false, 41 | "matched": 0, 42 | "unchecked": 0, 43 | "unmatched": 0, 44 | "updated": 0 45 | }, 46 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_circle.test.ts", 47 | "testResults": [ 48 | { 49 | "ancestorTitles": ["being found when looking for CI"], 50 | "duration": 9, 51 | "failureMessages": [], 52 | "fullName": "being found when looking for CI finds Circle with the right ENV", 53 | "numPassingAsserts": 0, 54 | "status": "passed", 55 | "title": "finds Circle with the right ENV" 56 | }, 57 | { 58 | "ancestorTitles": [".isCI"], 59 | "duration": 2, 60 | "failureMessages": [], 61 | "fullName": ".isCI validates when all Circle environment vars are set", 62 | "numPassingAsserts": 0, 63 | "status": "passed", 64 | "title": "validates when all Circle environment vars are set" 65 | }, 66 | { 67 | "ancestorTitles": [".isCI"], 68 | "duration": 2, 69 | "failureMessages": [], 70 | "fullName": ".isCI does not validate without josh", 71 | "numPassingAsserts": 0, 72 | "status": "passed", 73 | "title": "does not validate without josh" 74 | }, 75 | { 76 | "ancestorTitles": [".isPR"], 77 | "duration": 1, 78 | "failureMessages": [], 79 | "fullName": ".isPR validates when all circle environment vars are set", 80 | "numPassingAsserts": 0, 81 | "status": "passed", 82 | "title": "validates when all circle environment vars are set" 83 | }, 84 | { 85 | "ancestorTitles": [".isPR"], 86 | "duration": 1, 87 | "failureMessages": [], 88 | "fullName": ".isPR does not validate outside of circle", 89 | "numPassingAsserts": 0, 90 | "status": "passed", 91 | "title": "does not validate outside of circle" 92 | }, 93 | { 94 | "ancestorTitles": [".isPR"], 95 | "duration": 1, 96 | "failureMessages": [], 97 | "fullName": ".isPR does not validate when CIRCLE_CI_API_TOKEN is missing", 98 | "numPassingAsserts": 0, 99 | "status": "passed", 100 | "title": "does not validate when CIRCLE_CI_API_TOKEN is missing" 101 | }, 102 | { 103 | "ancestorTitles": [".isPR"], 104 | "duration": 1, 105 | "failureMessages": [], 106 | "fullName": ".isPR does not validate when CIRCLE_PROJECT_USERNAME is missing", 107 | "numPassingAsserts": 0, 108 | "status": "passed", 109 | "title": "does not validate when CIRCLE_PROJECT_USERNAME is missing" 110 | }, 111 | { 112 | "ancestorTitles": [".isPR"], 113 | "duration": 1, 114 | "failureMessages": [], 115 | "fullName": ".isPR does not validate when CIRCLE_PROJECT_REPONAME is missing", 116 | "numPassingAsserts": 0, 117 | "status": "passed", 118 | "title": "does not validate when CIRCLE_PROJECT_REPONAME is missing" 119 | }, 120 | { 121 | "ancestorTitles": [".isPR"], 122 | "duration": 1, 123 | "failureMessages": [], 124 | "fullName": ".isPR does not validate when CIRCLE_BUILD_NUM is missing", 125 | "numPassingAsserts": 0, 126 | "status": "passed", 127 | "title": "does not validate when CIRCLE_BUILD_NUM is missing" 128 | }, 129 | { 130 | "ancestorTitles": [".isPR"], 131 | "duration": 1, 132 | "failureMessages": [], 133 | "fullName": ".isPR needs to have a PR number", 134 | "numPassingAsserts": 0, 135 | "status": "passed", 136 | "title": "needs to have a PR number" 137 | }, 138 | { 139 | "ancestorTitles": [".pullReuestID"], 140 | "duration": 1, 141 | "failureMessages": [], 142 | "fullName": ".pullReuestID pulls it out of the env", 143 | "numPassingAsserts": 0, 144 | "status": "passed", 145 | "title": "pulls it out of the env" 146 | }, 147 | { 148 | "ancestorTitles": [".pullReuestID"], 149 | "duration": 1, 150 | "failureMessages": [], 151 | "fullName": ".pullReuestID can derive it from PR Url", 152 | "numPassingAsserts": 0, 153 | "status": "passed", 154 | "title": "can derive it from PR Url" 155 | }, 156 | { 157 | "ancestorTitles": [".repoSlug"], 158 | "duration": 1, 159 | "failureMessages": [], 160 | "fullName": ".repoSlug derives it from the PR Url", 161 | "numPassingAsserts": 0, 162 | "status": "passed", 163 | "title": "derives it from the PR Url" 164 | } 165 | ], 166 | "sourceMaps": {}, 167 | "skipped": false 168 | }, 169 | { 170 | "console": null, 171 | "failureMessage": null, 172 | "numFailingTests": 0, 173 | "numPassingTests": 13, 174 | "numPendingTests": 0, 175 | "perfStats": { 176 | "end": 1495637919795, 177 | "start": 1495637917989 178 | }, 179 | "snapshot": { 180 | "added": 0, 181 | "fileDeleted": false, 182 | "matched": 5, 183 | "unchecked": 0, 184 | "unmatched": 0, 185 | "updated": 0 186 | }, 187 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/platforms/github/_tests/_github_git.test.ts", 188 | "testResults": [ 189 | { 190 | "ancestorTitles": ["the dangerfile gitDSL"], 191 | "duration": 64, 192 | "failureMessages": [], 193 | "fullName": "the dangerfile gitDSL sets the modified/created/deleted", 194 | "numPassingAsserts": 0, 195 | "status": "passed", 196 | "title": "sets the modified/created/deleted" 197 | }, 198 | { 199 | "ancestorTitles": ["the dangerfile gitDSL"], 200 | "duration": 19, 201 | "failureMessages": [], 202 | "fullName": "the dangerfile gitDSL shows the diff for a specific file", 203 | "numPassingAsserts": 0, 204 | "status": "passed", 205 | "title": "shows the diff for a specific file" 206 | }, 207 | { 208 | "ancestorTitles": ["the dangerfile gitDSL"], 209 | "duration": 11, 210 | "failureMessages": [], 211 | "fullName": "the dangerfile gitDSL should include `before` text content of the file", 212 | "numPassingAsserts": 0, 213 | "status": "passed", 214 | "title": "should include `before` text content of the file" 215 | }, 216 | { 217 | "ancestorTitles": ["the dangerfile gitDSL"], 218 | "duration": 14, 219 | "failureMessages": [], 220 | "fullName": "the dangerfile gitDSL should include `after` text content of the file", 221 | "numPassingAsserts": 0, 222 | "status": "passed", 223 | "title": "should include `after` text content of the file" 224 | }, 225 | { 226 | "ancestorTitles": ["the dangerfile gitDSL"], 227 | "duration": 9, 228 | "failureMessages": [], 229 | "fullName": "the dangerfile gitDSL should include `added` text content of the file", 230 | "numPassingAsserts": 0, 231 | "status": "passed", 232 | "title": "should include `added` text content of the file" 233 | }, 234 | { 235 | "ancestorTitles": ["the dangerfile gitDSL"], 236 | "duration": 12, 237 | "failureMessages": [], 238 | "fullName": "the dangerfile gitDSL should include `removed` text content of the file", 239 | "numPassingAsserts": 0, 240 | "status": "passed", 241 | "title": "should include `removed` text content of the file" 242 | }, 243 | { 244 | "ancestorTitles": ["the dangerfile gitDSL"], 245 | "duration": 7, 246 | "failureMessages": [], 247 | "fullName": "the dangerfile gitDSL resolves to `null` for files not in modified_files", 248 | "numPassingAsserts": 0, 249 | "status": "passed", 250 | "title": "resolves to `null` for files not in modified_files" 251 | }, 252 | { 253 | "ancestorTitles": ["the dangerfile gitDSL"], 254 | "duration": 28, 255 | "failureMessages": [], 256 | "fullName": "the dangerfile gitDSL sets up commit data correctly", 257 | "numPassingAsserts": 0, 258 | "status": "passed", 259 | "title": "sets up commit data correctly" 260 | }, 261 | { 262 | "ancestorTitles": ["the dangerfile gitDSL", "JSONPatchForFile"], 263 | "duration": 11, 264 | "failureMessages": [], 265 | "fullName": "the dangerfile gitDSL JSONPatchForFile returns a null for files not in the modified_files", 266 | "numPassingAsserts": 0, 267 | "status": "passed", 268 | "title": "returns a null for files not in the modified_files" 269 | }, 270 | { 271 | "ancestorTitles": ["the dangerfile gitDSL", "JSONPatchForFile"], 272 | "duration": 13, 273 | "failureMessages": [], 274 | "fullName": "the dangerfile gitDSL JSONPatchForFile handles showing a patch for two different diff files", 275 | "numPassingAsserts": 0, 276 | "status": "passed", 277 | "title": "handles showing a patch for two different diff files" 278 | }, 279 | { 280 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 281 | "duration": 8, 282 | "failureMessages": [], 283 | "fullName": "the dangerfile gitDSL JSONDiffForFile returns an empty object for files not in the modified_files", 284 | "numPassingAsserts": 0, 285 | "status": "passed", 286 | "title": "returns an empty object for files not in the modified_files" 287 | }, 288 | { 289 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 290 | "duration": 12, 291 | "failureMessages": [], 292 | "fullName": "the dangerfile gitDSL JSONDiffForFile handles showing a patch for two different diff files", 293 | "numPassingAsserts": 0, 294 | "status": "passed", 295 | "title": "handles showing a patch for two different diff files" 296 | }, 297 | { 298 | "ancestorTitles": ["the dangerfile gitDSL", "JSONDiffForFile"], 299 | "duration": 13, 300 | "failureMessages": [], 301 | "fullName": "the dangerfile gitDSL JSONDiffForFile handles a package.json change elegantly", 302 | "numPassingAsserts": 0, 303 | "status": "passed", 304 | "title": "handles a package.json change elegantly" 305 | } 306 | ], 307 | "sourceMaps": {}, 308 | "skipped": false 309 | }, 310 | { 311 | "console": null, 312 | "failureMessage": null, 313 | "numFailingTests": 0, 314 | "numPassingTests": 10, 315 | "numPendingTests": 0, 316 | "perfStats": { 317 | "end": 1495637920445, 318 | "start": 1495637919822 319 | }, 320 | "snapshot": { 321 | "added": 0, 322 | "fileDeleted": false, 323 | "matched": 0, 324 | "unchecked": 0, 325 | "unmatched": 0, 326 | "updated": 0 327 | }, 328 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/platforms/github/_tests/_github_api.test.ts", 329 | "testResults": [ 330 | { 331 | "ancestorTitles": ["getPlatformDSLRepresentation"], 332 | "duration": 23, 333 | "failureMessages": [], 334 | "fullName": "getPlatformDSLRepresentation should return the correct review title from getReviewInfo", 335 | "numPassingAsserts": 0, 336 | "status": "passed", 337 | "title": "should return the correct review title from getReviewInfo" 338 | }, 339 | { 340 | "ancestorTitles": ["getPlatformDSLRepresentation"], 341 | "duration": 4, 342 | "failureMessages": [], 343 | "fullName": "getPlatformDSLRepresentation should get the issue label", 344 | "numPassingAsserts": 0, 345 | "status": "passed", 346 | "title": "should get the issue label" 347 | }, 348 | { 349 | "ancestorTitles": ["getPlatformDSLRepresentation"], 350 | "duration": 8, 351 | "failureMessages": [], 352 | "fullName": "getPlatformDSLRepresentation should get the commits of the pull request", 353 | "numPassingAsserts": 0, 354 | "status": "passed", 355 | "title": "should get the commits of the pull request" 356 | }, 357 | { 358 | "ancestorTitles": ["getPlatformDSLRepresentation"], 359 | "duration": 8, 360 | "failureMessages": [], 361 | "fullName": "getPlatformDSLRepresentation should get the reviews", 362 | "numPassingAsserts": 0, 363 | "status": "passed", 364 | "title": "should get the reviews" 365 | }, 366 | { 367 | "ancestorTitles": ["getPlatformDSLRepresentation"], 368 | "duration": 5, 369 | "failureMessages": [], 370 | "fullName": "getPlatformDSLRepresentation should get the reviewer requests", 371 | "numPassingAsserts": 0, 372 | "status": "passed", 373 | "title": "should get the reviewer requests" 374 | }, 375 | { 376 | "ancestorTitles": ["getPlatformDSLRepresentation"], 377 | "duration": 6, 378 | "failureMessages": [], 379 | "fullName": "getPlatformDSLRepresentation should get the pull request informations", 380 | "numPassingAsserts": 0, 381 | "status": "passed", 382 | "title": "should get the pull request informations" 383 | }, 384 | { 385 | "ancestorTitles": [], 386 | "duration": 9, 387 | "failureMessages": [], 388 | "fullName": "fileContents expects to grab PR JSON and pull out a file API call", 389 | "numPassingAsserts": 0, 390 | "status": "passed", 391 | "title": "fileContents expects to grab PR JSON and pull out a file API call" 392 | }, 393 | { 394 | "ancestorTitles": ["API testing"], 395 | "duration": 3, 396 | "failureMessages": [], 397 | "fullName": "API testing getUserInfo", 398 | "numPassingAsserts": 0, 399 | "status": "passed", 400 | "title": "getUserInfo" 401 | }, 402 | { 403 | "ancestorTitles": ["API testing"], 404 | "duration": 8, 405 | "failureMessages": [], 406 | "fullName": "API testing updateCommentWithID", 407 | "numPassingAsserts": 0, 408 | "status": "passed", 409 | "title": "updateCommentWithID" 410 | }, 411 | { 412 | "ancestorTitles": ["Peril"], 413 | "duration": 3, 414 | "failureMessages": [], 415 | "fullName": "Peril Allows setting additional headers", 416 | "numPassingAsserts": 0, 417 | "status": "passed", 418 | "title": "Allows setting additional headers" 419 | } 420 | ], 421 | "sourceMaps": {}, 422 | "skipped": false 423 | }, 424 | { 425 | "console": null, 426 | "failureMessage": null, 427 | "numFailingTests": 0, 428 | "numPassingTests": 5, 429 | "numPendingTests": 0, 430 | "perfStats": { 431 | "end": 1495637920618, 432 | "start": 1495637919629 433 | }, 434 | "snapshot": { 435 | "added": 0, 436 | "fileDeleted": false, 437 | "matched": 0, 438 | "unchecked": 0, 439 | "unmatched": 0, 440 | "updated": 0 441 | }, 442 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/runner/_tests/_executor.test.ts", 443 | "testResults": [ 444 | { 445 | "ancestorTitles": ["setup"], 446 | "duration": 11, 447 | "failureMessages": [], 448 | "fullName": "setup gets diff / pr info in setup", 449 | "numPassingAsserts": 0, 450 | "status": "passed", 451 | "title": "gets diff / pr info in setup" 452 | }, 453 | { 454 | "ancestorTitles": ["setup"], 455 | "duration": 8, 456 | "failureMessages": [], 457 | "fullName": "setup gets diff / pr info / utils in setup", 458 | "numPassingAsserts": 0, 459 | "status": "passed", 460 | "title": "gets diff / pr info / utils in setup" 461 | }, 462 | { 463 | "ancestorTitles": ["setup"], 464 | "duration": 27, 465 | "failureMessages": [], 466 | "fullName": "setup Creates a DangerResults for a raising dangerfile", 467 | "numPassingAsserts": 0, 468 | "status": "passed", 469 | "title": "Creates a DangerResults for a raising dangerfile" 470 | }, 471 | { 472 | "ancestorTitles": ["setup"], 473 | "duration": 9, 474 | "failureMessages": [], 475 | "fullName": "setup Deletes a post when there are no messages", 476 | "numPassingAsserts": 0, 477 | "status": "passed", 478 | "title": "Deletes a post when there are no messages" 479 | }, 480 | { 481 | "ancestorTitles": ["setup"], 482 | "duration": 3, 483 | "failureMessages": [], 484 | "fullName": "setup Updates or Creates comments for warnings", 485 | "numPassingAsserts": 0, 486 | "status": "passed", 487 | "title": "Updates or Creates comments for warnings" 488 | } 489 | ], 490 | "sourceMaps": {}, 491 | "skipped": false 492 | }, 493 | { 494 | "console": null, 495 | "failureMessage": null, 496 | "numFailingTests": 0, 497 | "numPassingTests": 7, 498 | "numPendingTests": 0, 499 | "perfStats": { 500 | "end": 1495637920796, 501 | "start": 1495637920469 502 | }, 503 | "snapshot": { 504 | "added": 0, 505 | "fileDeleted": false, 506 | "matched": 1, 507 | "unchecked": 0, 508 | "unmatched": 0, 509 | "updated": 0 510 | }, 511 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/runner/templates/_tests/_githubIssueTemplates.test.ts", 512 | "testResults": [ 513 | { 514 | "ancestorTitles": ["generating messages"], 515 | "duration": 4, 516 | "failureMessages": [], 517 | "fullName": "generating messages shows no tables for empty results", 518 | "numPassingAsserts": 0, 519 | "status": "passed", 520 | "title": "shows no tables for empty results" 521 | }, 522 | { 523 | "ancestorTitles": ["generating messages"], 524 | "duration": 2, 525 | "failureMessages": [], 526 | "fullName": "generating messages shows no tables for results without messages", 527 | "numPassingAsserts": 0, 528 | "status": "passed", 529 | "title": "shows no tables for results without messages" 530 | }, 531 | { 532 | "ancestorTitles": ["generating messages"], 533 | "duration": 2, 534 | "failureMessages": [], 535 | "fullName": "generating messages Shows the failing messages in a table", 536 | "numPassingAsserts": 0, 537 | "status": "passed", 538 | "title": "Shows the failing messages in a table" 539 | }, 540 | { 541 | "ancestorTitles": ["generating messages"], 542 | "duration": 1, 543 | "failureMessages": [], 544 | "fullName": "generating messages Shows the warning messages in a table", 545 | "numPassingAsserts": 0, 546 | "status": "passed", 547 | "title": "Shows the warning messages in a table" 548 | }, 549 | { 550 | "ancestorTitles": ["generating messages"], 551 | "duration": 3, 552 | "failureMessages": [], 553 | "fullName": "generating messages does not break commonmark rules around line breaks", 554 | "numPassingAsserts": 0, 555 | "status": "passed", 556 | "title": "does not break commonmark rules around line breaks" 557 | }, 558 | { 559 | "ancestorTitles": ["generating messages"], 560 | "duration": 0, 561 | "failureMessages": [], 562 | "fullName": "generating messages Should include summary on top of message", 563 | "numPassingAsserts": 0, 564 | "status": "passed", 565 | "title": "Should include summary on top of message" 566 | }, 567 | { 568 | "ancestorTitles": ["generating messages"], 569 | "duration": 1, 570 | "failureMessages": [], 571 | "fullName": "generating messages leaves space between s to allow GitHub to render message content as markdown", 572 | "numPassingAsserts": 0, 573 | "status": "passed", 574 | "title": "leaves space between s to allow GitHub to render message content as markdown" 575 | } 576 | ], 577 | "sourceMaps": {}, 578 | "skipped": false 579 | }, 580 | { 581 | "console": null, 582 | "failureMessage": null, 583 | "numFailingTests": 0, 584 | "numPassingTests": 1, 585 | "numPendingTests": 0, 586 | "perfStats": { 587 | "end": 1495637920920, 588 | "start": 1495637920653 589 | }, 590 | "snapshot": { 591 | "added": 0, 592 | "fileDeleted": false, 593 | "matched": 0, 594 | "unchecked": 0, 595 | "unmatched": 0, 596 | "updated": 0 597 | }, 598 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/platforms/_tests/_platform.test.ts", 599 | "testResults": [ 600 | { 601 | "ancestorTitles": [], 602 | "duration": 4, 603 | "failureMessages": [], 604 | "fullName": "should bail if there is no DANGER_GITHUB_API_TOKEN found", 605 | "numPassingAsserts": 0, 606 | "status": "passed", 607 | "title": "should bail if there is no DANGER_GITHUB_API_TOKEN found" 608 | } 609 | ], 610 | "sourceMaps": {}, 611 | "skipped": false 612 | }, 613 | { 614 | "console": null, 615 | "failureMessage": null, 616 | "numFailingTests": 0, 617 | "numPassingTests": 12, 618 | "numPendingTests": 0, 619 | "perfStats": { 620 | "end": 1495637921089, 621 | "start": 1495637920811 622 | }, 623 | "snapshot": { 624 | "added": 0, 625 | "fileDeleted": false, 626 | "matched": 0, 627 | "unchecked": 0, 628 | "unmatched": 0, 629 | "updated": 0 630 | }, 631 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_semaphore.test.ts", 632 | "testResults": [ 633 | { 634 | "ancestorTitles": ["being found when looking for CI"], 635 | "duration": 3, 636 | "failureMessages": [], 637 | "fullName": "being found when looking for CI finds Semaphore with the right ENV", 638 | "numPassingAsserts": 0, 639 | "status": "passed", 640 | "title": "finds Semaphore with the right ENV" 641 | }, 642 | { 643 | "ancestorTitles": [".isCI"], 644 | "duration": 1, 645 | "failureMessages": [], 646 | "fullName": ".isCI validates when all Semaphore environment vars are set", 647 | "numPassingAsserts": 0, 648 | "status": "passed", 649 | "title": "validates when all Semaphore environment vars are set" 650 | }, 651 | { 652 | "ancestorTitles": [".isCI"], 653 | "duration": 1, 654 | "failureMessages": [], 655 | "fullName": ".isCI does not validate without josh", 656 | "numPassingAsserts": 0, 657 | "status": "passed", 658 | "title": "does not validate without josh" 659 | }, 660 | { 661 | "ancestorTitles": [".isPR"], 662 | "duration": 1, 663 | "failureMessages": [], 664 | "fullName": ".isPR validates when all semaphore environment vars are set", 665 | "numPassingAsserts": 0, 666 | "status": "passed", 667 | "title": "validates when all semaphore environment vars are set" 668 | }, 669 | { 670 | "ancestorTitles": [".isPR"], 671 | "duration": 1, 672 | "failureMessages": [], 673 | "fullName": ".isPR does not validate outside of semaphore", 674 | "numPassingAsserts": 0, 675 | "status": "passed", 676 | "title": "does not validate outside of semaphore" 677 | }, 678 | { 679 | "ancestorTitles": [".isPR"], 680 | "duration": 1, 681 | "failureMessages": [], 682 | "fullName": ".isPR does not validate when SEMAPHORE_CI_API_TOKEN is missing", 683 | "numPassingAsserts": 0, 684 | "status": "passed", 685 | "title": "does not validate when SEMAPHORE_CI_API_TOKEN is missing" 686 | }, 687 | { 688 | "ancestorTitles": [".isPR"], 689 | "duration": 0, 690 | "failureMessages": [], 691 | "fullName": ".isPR does not validate when SEMAPHORE_PROJECT_USERNAME is missing", 692 | "numPassingAsserts": 0, 693 | "status": "passed", 694 | "title": "does not validate when SEMAPHORE_PROJECT_USERNAME is missing" 695 | }, 696 | { 697 | "ancestorTitles": [".isPR"], 698 | "duration": 1, 699 | "failureMessages": [], 700 | "fullName": ".isPR does not validate when SEMAPHORE_PROJECT_REPONAME is missing", 701 | "numPassingAsserts": 0, 702 | "status": "passed", 703 | "title": "does not validate when SEMAPHORE_PROJECT_REPONAME is missing" 704 | }, 705 | { 706 | "ancestorTitles": [".isPR"], 707 | "duration": 0, 708 | "failureMessages": [], 709 | "fullName": ".isPR does not validate when SEMAPHORE_BUILD_NUM is missing", 710 | "numPassingAsserts": 0, 711 | "status": "passed", 712 | "title": "does not validate when SEMAPHORE_BUILD_NUM is missing" 713 | }, 714 | { 715 | "ancestorTitles": [".isPR"], 716 | "duration": 1, 717 | "failureMessages": [], 718 | "fullName": ".isPR needs to have a PR number", 719 | "numPassingAsserts": 0, 720 | "status": "passed", 721 | "title": "needs to have a PR number" 722 | }, 723 | { 724 | "ancestorTitles": [".pullRequestID"], 725 | "duration": 1, 726 | "failureMessages": [], 727 | "fullName": ".pullRequestID pulls it out of the env", 728 | "numPassingAsserts": 0, 729 | "status": "passed", 730 | "title": "pulls it out of the env" 731 | }, 732 | { 733 | "ancestorTitles": [".repoSlug"], 734 | "duration": 1, 735 | "failureMessages": [], 736 | "fullName": ".repoSlug derives it from the PR Url", 737 | "numPassingAsserts": 0, 738 | "status": "passed", 739 | "title": "derives it from the PR Url" 740 | } 741 | ], 742 | "sourceMaps": {}, 743 | "skipped": false 744 | }, 745 | { 746 | "console": null, 747 | "failureMessage": null, 748 | "numFailingTests": 0, 749 | "numPassingTests": 10, 750 | "numPendingTests": 0, 751 | "perfStats": { 752 | "end": 1495637921236, 753 | "start": 1495637920930 754 | }, 755 | "snapshot": { 756 | "added": 0, 757 | "fileDeleted": false, 758 | "matched": 0, 759 | "unchecked": 0, 760 | "unmatched": 0, 761 | "updated": 0 762 | }, 763 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_travis.test.ts", 764 | "testResults": [ 765 | { 766 | "ancestorTitles": ["being found when looking for CI"], 767 | "duration": 3, 768 | "failureMessages": [], 769 | "fullName": "being found when looking for CI finds Travis with the right ENV", 770 | "numPassingAsserts": 0, 771 | "status": "passed", 772 | "title": "finds Travis with the right ENV" 773 | }, 774 | { 775 | "ancestorTitles": [".isCI"], 776 | "duration": 3, 777 | "failureMessages": [], 778 | "fullName": ".isCI validates when all Travis environment vars are set and Josh K says so", 779 | "numPassingAsserts": 0, 780 | "status": "passed", 781 | "title": "validates when all Travis environment vars are set and Josh K says so" 782 | }, 783 | { 784 | "ancestorTitles": [".isCI"], 785 | "duration": 1, 786 | "failureMessages": [], 787 | "fullName": ".isCI does not validate without josh", 788 | "numPassingAsserts": 0, 789 | "status": "passed", 790 | "title": "does not validate without josh" 791 | }, 792 | { 793 | "ancestorTitles": [".isPR"], 794 | "duration": 1, 795 | "failureMessages": [], 796 | "fullName": ".isPR validates when all Travis environment vars are set and Josh K says so", 797 | "numPassingAsserts": 0, 798 | "status": "passed", 799 | "title": "validates when all Travis environment vars are set and Josh K says so" 800 | }, 801 | { 802 | "ancestorTitles": [".isPR"], 803 | "duration": 1, 804 | "failureMessages": [], 805 | "fullName": ".isPR does not validate without josh", 806 | "numPassingAsserts": 0, 807 | "status": "passed", 808 | "title": "does not validate without josh" 809 | }, 810 | { 811 | "ancestorTitles": [".isPR"], 812 | "duration": 1, 813 | "failureMessages": [], 814 | "fullName": ".isPR does not validate when TRAVIS_PULL_REQUEST is missing", 815 | "numPassingAsserts": 0, 816 | "status": "passed", 817 | "title": "does not validate when TRAVIS_PULL_REQUEST is missing" 818 | }, 819 | { 820 | "ancestorTitles": [".isPR"], 821 | "duration": 1, 822 | "failureMessages": [], 823 | "fullName": ".isPR does not validate when TRAVIS_REPO_SLUG is missing", 824 | "numPassingAsserts": 0, 825 | "status": "passed", 826 | "title": "does not validate when TRAVIS_REPO_SLUG is missing" 827 | }, 828 | { 829 | "ancestorTitles": [".isPR"], 830 | "duration": 1, 831 | "failureMessages": [], 832 | "fullName": ".isPR needs to have a PR number", 833 | "numPassingAsserts": 0, 834 | "status": "passed", 835 | "title": "needs to have a PR number" 836 | }, 837 | { 838 | "ancestorTitles": [".pullRequestID"], 839 | "duration": 1, 840 | "failureMessages": [], 841 | "fullName": ".pullRequestID pulls it out of the env", 842 | "numPassingAsserts": 0, 843 | "status": "passed", 844 | "title": "pulls it out of the env" 845 | }, 846 | { 847 | "ancestorTitles": [".repoSlug"], 848 | "duration": 2, 849 | "failureMessages": [], 850 | "fullName": ".repoSlug pulls it out of the env", 851 | "numPassingAsserts": 0, 852 | "status": "passed", 853 | "title": "pulls it out of the env" 854 | } 855 | ], 856 | "sourceMaps": {}, 857 | "skipped": false 858 | }, 859 | { 860 | "console": null, 861 | "failureMessage": null, 862 | "numFailingTests": 0, 863 | "numPassingTests": 4, 864 | "numPendingTests": 0, 865 | "perfStats": { 866 | "end": 1495637921370, 867 | "start": 1495637921102 868 | }, 869 | "snapshot": { 870 | "added": 0, 871 | "fileDeleted": false, 872 | "matched": 0, 873 | "unchecked": 0, 874 | "unmatched": 0, 875 | "updated": 0 876 | }, 877 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/_tests/_get_ci_source.test.ts", 878 | "testResults": [ 879 | { 880 | "ancestorTitles": [".getCISourceForEnv"], 881 | "duration": 6, 882 | "failureMessages": [], 883 | "fullName": ".getCISourceForEnv returns undefined if nothing is found", 884 | "numPassingAsserts": 0, 885 | "status": "passed", 886 | "title": "returns undefined if nothing is found" 887 | }, 888 | { 889 | "ancestorTitles": [".getCISourceForEnv"], 890 | "duration": 1, 891 | "failureMessages": [], 892 | "fullName": ".getCISourceForEnv falls back to the fake if DANGER_FAKE_CI exists", 893 | "numPassingAsserts": 0, 894 | "status": "passed", 895 | "title": "falls back to the fake if DANGER_FAKE_CI exists" 896 | }, 897 | { 898 | "ancestorTitles": [".getCISourceForExternal"], 899 | "duration": 0, 900 | "failureMessages": [], 901 | "fullName": ".getCISourceForExternal should resolve module relatively", 902 | "numPassingAsserts": 0, 903 | "status": "passed", 904 | "title": "should resolve module relatively" 905 | }, 906 | { 907 | "ancestorTitles": [".getCISourceForExternal"], 908 | "duration": 7, 909 | "failureMessages": [], 910 | "fullName": ".getCISourceForExternal should return undefined if module resolution fails", 911 | "numPassingAsserts": 0, 912 | "status": "passed", 913 | "title": "should return undefined if module resolution fails" 914 | } 915 | ], 916 | "sourceMaps": {}, 917 | "skipped": false 918 | }, 919 | { 920 | "console": null, 921 | "failureMessage": null, 922 | "numFailingTests": 0, 923 | "numPassingTests": 11, 924 | "numPendingTests": 0, 925 | "perfStats": { 926 | "end": 1495637921548, 927 | "start": 1495637921251 928 | }, 929 | "snapshot": { 930 | "added": 0, 931 | "fileDeleted": false, 932 | "matched": 0, 933 | "unchecked": 0, 934 | "unmatched": 0, 935 | "updated": 0 936 | }, 937 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_jenkins.test.ts", 938 | "testResults": [ 939 | { 940 | "ancestorTitles": ["being found when looking for CI"], 941 | "duration": 3, 942 | "failureMessages": [], 943 | "fullName": "being found when looking for CI finds Jenkins with the right ENV", 944 | "numPassingAsserts": 0, 945 | "status": "passed", 946 | "title": "finds Jenkins with the right ENV" 947 | }, 948 | { 949 | "ancestorTitles": [".isCI"], 950 | "duration": 0, 951 | "failureMessages": [], 952 | "fullName": ".isCI validates when JENKINS_URL is present in environment", 953 | "numPassingAsserts": 0, 954 | "status": "passed", 955 | "title": "validates when JENKINS_URL is present in environment" 956 | }, 957 | { 958 | "ancestorTitles": [".isCI"], 959 | "duration": 2, 960 | "failureMessages": [], 961 | "fullName": ".isCI does not validate without JENKINS_URL", 962 | "numPassingAsserts": 0, 963 | "status": "passed", 964 | "title": "does not validate without JENKINS_URL" 965 | }, 966 | { 967 | "ancestorTitles": [".isPR"], 968 | "duration": 4, 969 | "failureMessages": [], 970 | "fullName": ".isPR validates when all Jenkins environment variables are set", 971 | "numPassingAsserts": 0, 972 | "status": "passed", 973 | "title": "validates when all Jenkins environment variables are set" 974 | }, 975 | { 976 | "ancestorTitles": [".isPR"], 977 | "duration": 2, 978 | "failureMessages": [], 979 | "fullName": ".isPR does not validate with required environment variables", 980 | "numPassingAsserts": 0, 981 | "status": "passed", 982 | "title": "does not validate with required environment variables" 983 | }, 984 | { 985 | "ancestorTitles": [".isPR"], 986 | "duration": 1, 987 | "failureMessages": [], 988 | "fullName": ".isPR does not validate when JENKINS_URL is missing", 989 | "numPassingAsserts": 0, 990 | "status": "passed", 991 | "title": "does not validate when JENKINS_URL is missing" 992 | }, 993 | { 994 | "ancestorTitles": [".isPR"], 995 | "duration": 0, 996 | "failureMessages": [], 997 | "fullName": ".isPR does not validate when ghprbPullId is missing", 998 | "numPassingAsserts": 0, 999 | "status": "passed", 1000 | "title": "does not validate when ghprbPullId is missing" 1001 | }, 1002 | { 1003 | "ancestorTitles": [".isPR"], 1004 | "duration": 1, 1005 | "failureMessages": [], 1006 | "fullName": ".isPR does not validate when ghprbGhRepository is missing", 1007 | "numPassingAsserts": 0, 1008 | "status": "passed", 1009 | "title": "does not validate when ghprbGhRepository is missing" 1010 | }, 1011 | { 1012 | "ancestorTitles": [".isPR"], 1013 | "duration": 0, 1014 | "failureMessages": [], 1015 | "fullName": ".isPR needs to have a PR number", 1016 | "numPassingAsserts": 0, 1017 | "status": "passed", 1018 | "title": "needs to have a PR number" 1019 | }, 1020 | { 1021 | "ancestorTitles": [".pullRequestID"], 1022 | "duration": 0, 1023 | "failureMessages": [], 1024 | "fullName": ".pullRequestID pulls it out of environment", 1025 | "numPassingAsserts": 0, 1026 | "status": "passed", 1027 | "title": "pulls it out of environment" 1028 | }, 1029 | { 1030 | "ancestorTitles": [".repoSlug"], 1031 | "duration": 0, 1032 | "failureMessages": [], 1033 | "fullName": ".repoSlug pulls it out of environment", 1034 | "numPassingAsserts": 0, 1035 | "status": "passed", 1036 | "title": "pulls it out of environment" 1037 | } 1038 | ], 1039 | "sourceMaps": {}, 1040 | "skipped": false 1041 | }, 1042 | { 1043 | "console": null, 1044 | "failureMessage": null, 1045 | "numFailingTests": 0, 1046 | "numPassingTests": 11, 1047 | "numPendingTests": 0, 1048 | "perfStats": { 1049 | "end": 1495637921688, 1050 | "start": 1495637921380 1051 | }, 1052 | "snapshot": { 1053 | "added": 0, 1054 | "fileDeleted": false, 1055 | "matched": 0, 1056 | "unchecked": 0, 1057 | "unmatched": 0, 1058 | "updated": 0 1059 | }, 1060 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_buildkite.test.ts", 1061 | "testResults": [ 1062 | { 1063 | "ancestorTitles": ["being found when looking for CI"], 1064 | "duration": 4, 1065 | "failureMessages": [], 1066 | "fullName": "being found when looking for CI finds Buildkite with the right ENV", 1067 | "numPassingAsserts": 0, 1068 | "status": "passed", 1069 | "title": "finds Buildkite with the right ENV" 1070 | }, 1071 | { 1072 | "ancestorTitles": [".isCI"], 1073 | "duration": 0, 1074 | "failureMessages": [], 1075 | "fullName": ".isCI validates when all Buildkite environment vars are set", 1076 | "numPassingAsserts": 0, 1077 | "status": "passed", 1078 | "title": "validates when all Buildkite environment vars are set" 1079 | }, 1080 | { 1081 | "ancestorTitles": [".isCI"], 1082 | "duration": 2, 1083 | "failureMessages": [], 1084 | "fullName": ".isCI does not validate without env", 1085 | "numPassingAsserts": 0, 1086 | "status": "passed", 1087 | "title": "does not validate without env" 1088 | }, 1089 | { 1090 | "ancestorTitles": [".isPR"], 1091 | "duration": 3, 1092 | "failureMessages": [], 1093 | "fullName": ".isPR validates when all buildkite environment vars are set", 1094 | "numPassingAsserts": 0, 1095 | "status": "passed", 1096 | "title": "validates when all buildkite environment vars are set" 1097 | }, 1098 | { 1099 | "ancestorTitles": [".isPR"], 1100 | "duration": 1, 1101 | "failureMessages": [], 1102 | "fullName": ".isPR does not validate outside of buildkite", 1103 | "numPassingAsserts": 0, 1104 | "status": "passed", 1105 | "title": "does not validate outside of buildkite" 1106 | }, 1107 | { 1108 | "ancestorTitles": [".isPR"], 1109 | "duration": 2, 1110 | "failureMessages": [], 1111 | "fullName": ".isPR does not validate when BUILDKITE_PULL_REQUEST is missing", 1112 | "numPassingAsserts": 0, 1113 | "status": "passed", 1114 | "title": "does not validate when BUILDKITE_PULL_REQUEST is missing" 1115 | }, 1116 | { 1117 | "ancestorTitles": [".isPR"], 1118 | "duration": 0, 1119 | "failureMessages": [], 1120 | "fullName": ".isPR does not validate when BUILDKITE_REPO is missing", 1121 | "numPassingAsserts": 0, 1122 | "status": "passed", 1123 | "title": "does not validate when BUILDKITE_REPO is missing" 1124 | }, 1125 | { 1126 | "ancestorTitles": [".isPR"], 1127 | "duration": 1, 1128 | "failureMessages": [], 1129 | "fullName": ".isPR does not validate when BUILDKITE is missing", 1130 | "numPassingAsserts": 0, 1131 | "status": "passed", 1132 | "title": "does not validate when BUILDKITE is missing" 1133 | }, 1134 | { 1135 | "ancestorTitles": [".pullRequestID"], 1136 | "duration": 0, 1137 | "failureMessages": [], 1138 | "fullName": ".pullRequestID pulls it out of the env", 1139 | "numPassingAsserts": 0, 1140 | "status": "passed", 1141 | "title": "pulls it out of the env" 1142 | }, 1143 | { 1144 | "ancestorTitles": [".repoSlug"], 1145 | "duration": 6, 1146 | "failureMessages": [], 1147 | "fullName": ".repoSlug derives it from the repo URL", 1148 | "numPassingAsserts": 0, 1149 | "status": "passed", 1150 | "title": "derives it from the repo URL" 1151 | }, 1152 | { 1153 | "ancestorTitles": [".repoSlug"], 1154 | "duration": 1, 1155 | "failureMessages": [], 1156 | "fullName": ".repoSlug derives it from the repo URL in SSH format", 1157 | "numPassingAsserts": 0, 1158 | "status": "passed", 1159 | "title": "derives it from the repo URL in SSH format" 1160 | } 1161 | ], 1162 | "sourceMaps": {}, 1163 | "skipped": false 1164 | }, 1165 | { 1166 | "console": null, 1167 | "failureMessage": null, 1168 | "numFailingTests": 0, 1169 | "numPassingTests": 10, 1170 | "numPendingTests": 0, 1171 | "perfStats": { 1172 | "end": 1495637921841, 1173 | "start": 1495637921563 1174 | }, 1175 | "snapshot": { 1176 | "added": 0, 1177 | "fileDeleted": false, 1178 | "matched": 0, 1179 | "unchecked": 0, 1180 | "unmatched": 0, 1181 | "updated": 0 1182 | }, 1183 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_dockerCloud.test.ts", 1184 | "testResults": [ 1185 | { 1186 | "ancestorTitles": ["being found when looking for CI"], 1187 | "duration": 4, 1188 | "failureMessages": [], 1189 | "fullName": "being found when looking for CI finds DockerCloud with the right ENV", 1190 | "numPassingAsserts": 0, 1191 | "status": "passed", 1192 | "title": "finds DockerCloud with the right ENV" 1193 | }, 1194 | { 1195 | "ancestorTitles": [".isCI"], 1196 | "duration": 1, 1197 | "failureMessages": [], 1198 | "fullName": ".isCI validates when all DockerCloud environment vars are set", 1199 | "numPassingAsserts": 0, 1200 | "status": "passed", 1201 | "title": "validates when all DockerCloud environment vars are set" 1202 | }, 1203 | { 1204 | "ancestorTitles": [".isCI"], 1205 | "duration": 1, 1206 | "failureMessages": [], 1207 | "fullName": ".isCI does not validate without env", 1208 | "numPassingAsserts": 0, 1209 | "status": "passed", 1210 | "title": "does not validate without env" 1211 | }, 1212 | { 1213 | "ancestorTitles": [".isPR"], 1214 | "duration": 1, 1215 | "failureMessages": [], 1216 | "fullName": ".isPR validates when all dockerCloud environment vars are set", 1217 | "numPassingAsserts": 0, 1218 | "status": "passed", 1219 | "title": "validates when all dockerCloud environment vars are set" 1220 | }, 1221 | { 1222 | "ancestorTitles": [".isPR"], 1223 | "duration": 1, 1224 | "failureMessages": [], 1225 | "fullName": ".isPR does not validate outside of dockerCloud", 1226 | "numPassingAsserts": 0, 1227 | "status": "passed", 1228 | "title": "does not validate outside of dockerCloud" 1229 | }, 1230 | { 1231 | "ancestorTitles": [".isPR"], 1232 | "duration": 1, 1233 | "failureMessages": [], 1234 | "fullName": ".isPR does not validate when PULL_REQUEST_URL is missing", 1235 | "numPassingAsserts": 0, 1236 | "status": "passed", 1237 | "title": "does not validate when PULL_REQUEST_URL is missing" 1238 | }, 1239 | { 1240 | "ancestorTitles": [".isPR"], 1241 | "duration": 1, 1242 | "failureMessages": [], 1243 | "fullName": ".isPR does not validate when SOURCE_REPOSITORY_URL is missing", 1244 | "numPassingAsserts": 0, 1245 | "status": "passed", 1246 | "title": "does not validate when SOURCE_REPOSITORY_URL is missing" 1247 | }, 1248 | { 1249 | "ancestorTitles": [".isPR"], 1250 | "duration": 0, 1251 | "failureMessages": [], 1252 | "fullName": ".isPR does not validate when DOCKER_REPO is missing", 1253 | "numPassingAsserts": 0, 1254 | "status": "passed", 1255 | "title": "does not validate when DOCKER_REPO is missing" 1256 | }, 1257 | { 1258 | "ancestorTitles": [".pullRequestID"], 1259 | "duration": 1, 1260 | "failureMessages": [], 1261 | "fullName": ".pullRequestID pulls it out of the env", 1262 | "numPassingAsserts": 0, 1263 | "status": "passed", 1264 | "title": "pulls it out of the env" 1265 | }, 1266 | { 1267 | "ancestorTitles": [".repoSlug"], 1268 | "duration": 1, 1269 | "failureMessages": [], 1270 | "fullName": ".repoSlug derives it from the PR Url", 1271 | "numPassingAsserts": 0, 1272 | "status": "passed", 1273 | "title": "derives it from the PR Url" 1274 | } 1275 | ], 1276 | "sourceMaps": {}, 1277 | "skipped": false 1278 | }, 1279 | { 1280 | "console": null, 1281 | "failureMessage": null, 1282 | "numFailingTests": 0, 1283 | "numPassingTests": 4, 1284 | "numPendingTests": 0, 1285 | "perfStats": { 1286 | "end": 1495637921913, 1287 | "start": 1495637921700 1288 | }, 1289 | "snapshot": { 1290 | "added": 0, 1291 | "fileDeleted": false, 1292 | "matched": 0, 1293 | "unchecked": 0, 1294 | "unmatched": 0, 1295 | "updated": 0 1296 | }, 1297 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/commands/utils/_tests/file-utils.test.ts", 1298 | "testResults": [ 1299 | { 1300 | "ancestorTitles": ["dangerfilePath"], 1301 | "duration": 5, 1302 | "failureMessages": [], 1303 | "fullName": "dangerfilePath should return anything passed into the program's dangerfile", 1304 | "numPassingAsserts": 0, 1305 | "status": "passed", 1306 | "title": "should return anything passed into the program's dangerfile" 1307 | }, 1308 | { 1309 | "ancestorTitles": ["dangerfilePath"], 1310 | "duration": 1, 1311 | "failureMessages": [], 1312 | "fullName": "dangerfilePath should find a dangerfile.js if there is no program, and the .js file exists", 1313 | "numPassingAsserts": 0, 1314 | "status": "passed", 1315 | "title": "should find a dangerfile.js if there is no program, and the .js file exists" 1316 | }, 1317 | { 1318 | "ancestorTitles": ["dangerfilePath"], 1319 | "duration": 0, 1320 | "failureMessages": [], 1321 | "fullName": "dangerfilePath should find a dangerfile.ts if there is no program, and the .js file does not exist", 1322 | "numPassingAsserts": 0, 1323 | "status": "passed", 1324 | "title": "should find a dangerfile.ts if there is no program, and the .js file does not exist" 1325 | }, 1326 | { 1327 | "ancestorTitles": ["dangerfilePath"], 1328 | "duration": 1, 1329 | "failureMessages": [], 1330 | "fullName": "dangerfilePath should raise if nothing exists", 1331 | "numPassingAsserts": 0, 1332 | "status": "passed", 1333 | "title": "should raise if nothing exists" 1334 | } 1335 | ], 1336 | "sourceMaps": {}, 1337 | "skipped": false 1338 | }, 1339 | { 1340 | "console": null, 1341 | "failureMessage": null, 1342 | "numFailingTests": 0, 1343 | "numPassingTests": 3, 1344 | "numPendingTests": 0, 1345 | "perfStats": { 1346 | "end": 1495637922185, 1347 | "start": 1495637921937 1348 | }, 1349 | "snapshot": { 1350 | "added": 0, 1351 | "fileDeleted": false, 1352 | "matched": 0, 1353 | "unchecked": 0, 1354 | "unmatched": 0, 1355 | "updated": 0 1356 | }, 1357 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/platforms/github/_tests/_pull_request_parser.test.ts", 1358 | "testResults": [ 1359 | { 1360 | "ancestorTitles": ["parsing urls"], 1361 | "duration": 4, 1362 | "failureMessages": [], 1363 | "fullName": "parsing urls handles bad data", 1364 | "numPassingAsserts": 0, 1365 | "status": "passed", 1366 | "title": "handles bad data" 1367 | }, 1368 | { 1369 | "ancestorTitles": ["parsing urls"], 1370 | "duration": 2, 1371 | "failureMessages": [], 1372 | "fullName": "parsing urls pulls out the repo / pr ID", 1373 | "numPassingAsserts": 0, 1374 | "status": "passed", 1375 | "title": "pulls out the repo / pr ID" 1376 | }, 1377 | { 1378 | "ancestorTitles": ["parsing urls"], 1379 | "duration": 2, 1380 | "failureMessages": [], 1381 | "fullName": "parsing urls handles query params too", 1382 | "numPassingAsserts": 0, 1383 | "status": "passed", 1384 | "title": "handles query params too" 1385 | } 1386 | ], 1387 | "sourceMaps": {}, 1388 | "skipped": false 1389 | }, 1390 | { 1391 | "console": null, 1392 | "failureMessage": null, 1393 | "numFailingTests": 0, 1394 | "numPassingTests": 10, 1395 | "numPendingTests": 0, 1396 | "perfStats": { 1397 | "end": 1495637922191, 1398 | "start": 1495637921850 1399 | }, 1400 | "snapshot": { 1401 | "added": 0, 1402 | "fileDeleted": false, 1403 | "matched": 0, 1404 | "unchecked": 0, 1405 | "unmatched": 0, 1406 | "updated": 0 1407 | }, 1408 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/ci_source/providers/_tests/_drone.test.ts", 1409 | "testResults": [ 1410 | { 1411 | "ancestorTitles": ["being found when looking for CI"], 1412 | "duration": 4, 1413 | "failureMessages": [], 1414 | "fullName": "being found when looking for CI finds Drone with the right ENV", 1415 | "numPassingAsserts": 0, 1416 | "status": "passed", 1417 | "title": "finds Drone with the right ENV" 1418 | }, 1419 | { 1420 | "ancestorTitles": [".isCI"], 1421 | "duration": 0, 1422 | "failureMessages": [], 1423 | "fullName": ".isCI validates when all Drone environment vars are set", 1424 | "numPassingAsserts": 0, 1425 | "status": "passed", 1426 | "title": "validates when all Drone environment vars are set" 1427 | }, 1428 | { 1429 | "ancestorTitles": [".isCI"], 1430 | "duration": 1, 1431 | "failureMessages": [], 1432 | "fullName": ".isCI does not validate without DRONE", 1433 | "numPassingAsserts": 0, 1434 | "status": "passed", 1435 | "title": "does not validate without DRONE" 1436 | }, 1437 | { 1438 | "ancestorTitles": [".isPR"], 1439 | "duration": 2, 1440 | "failureMessages": [], 1441 | "fullName": ".isPR validates when all Drone environment vars are set", 1442 | "numPassingAsserts": 0, 1443 | "status": "passed", 1444 | "title": "validates when all Drone environment vars are set" 1445 | }, 1446 | { 1447 | "ancestorTitles": [".isPR"], 1448 | "duration": 1, 1449 | "failureMessages": [], 1450 | "fullName": ".isPR does not validate without DRONE_PULL_REQUEST", 1451 | "numPassingAsserts": 0, 1452 | "status": "passed", 1453 | "title": "does not validate without DRONE_PULL_REQUEST" 1454 | }, 1455 | { 1456 | "ancestorTitles": [".isPR"], 1457 | "duration": 1, 1458 | "failureMessages": [], 1459 | "fullName": ".isPR does not validate when DRONE_PULL_REQUEST is missing", 1460 | "numPassingAsserts": 0, 1461 | "status": "passed", 1462 | "title": "does not validate when DRONE_PULL_REQUEST is missing" 1463 | }, 1464 | { 1465 | "ancestorTitles": [".isPR"], 1466 | "duration": 1, 1467 | "failureMessages": [], 1468 | "fullName": ".isPR does not validate when DRONE_REPO is missing", 1469 | "numPassingAsserts": 0, 1470 | "status": "passed", 1471 | "title": "does not validate when DRONE_REPO is missing" 1472 | }, 1473 | { 1474 | "ancestorTitles": [".isPR"], 1475 | "duration": 0, 1476 | "failureMessages": [], 1477 | "fullName": ".isPR needs to have a PR number", 1478 | "numPassingAsserts": 0, 1479 | "status": "passed", 1480 | "title": "needs to have a PR number" 1481 | }, 1482 | { 1483 | "ancestorTitles": [".pullRequestID"], 1484 | "duration": 2, 1485 | "failureMessages": [], 1486 | "fullName": ".pullRequestID pulls it out of the env", 1487 | "numPassingAsserts": 0, 1488 | "status": "passed", 1489 | "title": "pulls it out of the env" 1490 | }, 1491 | { 1492 | "ancestorTitles": [".repoSlug"], 1493 | "duration": 6, 1494 | "failureMessages": [], 1495 | "fullName": ".repoSlug pulls it out of the env", 1496 | "numPassingAsserts": 0, 1497 | "status": "passed", 1498 | "title": "pulls it out of the env" 1499 | } 1500 | ], 1501 | "sourceMaps": {}, 1502 | "skipped": false 1503 | }, 1504 | { 1505 | "console": null, 1506 | "failureMessage": null, 1507 | "numFailingTests": 0, 1508 | "numPassingTests": 3, 1509 | "numPendingTests": 0, 1510 | "perfStats": { 1511 | "end": 1495637922516, 1512 | "start": 1495637922195 1513 | }, 1514 | "snapshot": { 1515 | "added": 0, 1516 | "fileDeleted": false, 1517 | "matched": 0, 1518 | "unchecked": 0, 1519 | "unmatched": 0, 1520 | "updated": 0 1521 | }, 1522 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/platforms/github/_tests/_github_utils.test.ts", 1523 | "testResults": [ 1524 | { 1525 | "ancestorTitles": ["fileLinks"], 1526 | "duration": 9, 1527 | "failureMessages": [], 1528 | "fullName": "fileLinks Should convert a few paths into links", 1529 | "numPassingAsserts": 0, 1530 | "status": "passed", 1531 | "title": "Should convert a few paths into links" 1532 | }, 1533 | { 1534 | "ancestorTitles": ["fileLinks"], 1535 | "duration": 0, 1536 | "failureMessages": [], 1537 | "fullName": "fileLinks Should convert a few paths into links showing full links", 1538 | "numPassingAsserts": 0, 1539 | "status": "passed", 1540 | "title": "Should convert a few paths into links showing full links" 1541 | }, 1542 | { 1543 | "ancestorTitles": ["fileLinks"], 1544 | "duration": 1, 1545 | "failureMessages": [], 1546 | "fullName": "fileLinks Should convert a few paths into links showing full link on a custom fork/branch", 1547 | "numPassingAsserts": 0, 1548 | "status": "passed", 1549 | "title": "Should convert a few paths into links showing full link on a custom fork/branch" 1550 | } 1551 | ], 1552 | "sourceMaps": {}, 1553 | "skipped": false 1554 | }, 1555 | { 1556 | "console": null, 1557 | "failureMessage": null, 1558 | "numFailingTests": 0, 1559 | "numPassingTests": 6, 1560 | "numPendingTests": 0, 1561 | "perfStats": { 1562 | "end": 1495637922568, 1563 | "start": 1495637922241 1564 | }, 1565 | "snapshot": { 1566 | "added": 0, 1567 | "fileDeleted": false, 1568 | "matched": 0, 1569 | "unchecked": 0, 1570 | "unmatched": 0, 1571 | "updated": 0 1572 | }, 1573 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/platforms/_tests/_github.test.ts", 1574 | "testResults": [ 1575 | { 1576 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1577 | "duration": 17, 1578 | "failureMessages": [], 1579 | "fullName": "getPlatformDSLRepresentation should return the correct review title from getReviewInfo", 1580 | "numPassingAsserts": 0, 1581 | "status": "passed", 1582 | "title": "should return the correct review title from getReviewInfo" 1583 | }, 1584 | { 1585 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1586 | "duration": 2, 1587 | "failureMessages": [], 1588 | "fullName": "getPlatformDSLRepresentation should get the issue label", 1589 | "numPassingAsserts": 0, 1590 | "status": "passed", 1591 | "title": "should get the issue label" 1592 | }, 1593 | { 1594 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1595 | "duration": 6, 1596 | "failureMessages": [], 1597 | "fullName": "getPlatformDSLRepresentation should get the commits of the pull request", 1598 | "numPassingAsserts": 0, 1599 | "status": "passed", 1600 | "title": "should get the commits of the pull request" 1601 | }, 1602 | { 1603 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1604 | "duration": 9, 1605 | "failureMessages": [], 1606 | "fullName": "getPlatformDSLRepresentation should get the reviews", 1607 | "numPassingAsserts": 0, 1608 | "status": "passed", 1609 | "title": "should get the reviews" 1610 | }, 1611 | { 1612 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1613 | "duration": 4, 1614 | "failureMessages": [], 1615 | "fullName": "getPlatformDSLRepresentation should get the reviewer requests", 1616 | "numPassingAsserts": 0, 1617 | "status": "passed", 1618 | "title": "should get the reviewer requests" 1619 | }, 1620 | { 1621 | "ancestorTitles": ["getPlatformDSLRepresentation"], 1622 | "duration": 4, 1623 | "failureMessages": [], 1624 | "fullName": "getPlatformDSLRepresentation should get the pull request informations", 1625 | "numPassingAsserts": 0, 1626 | "status": "passed", 1627 | "title": "should get the pull request informations" 1628 | } 1629 | ], 1630 | "sourceMaps": {}, 1631 | "skipped": false 1632 | }, 1633 | { 1634 | "console": null, 1635 | "failureMessage": null, 1636 | "numFailingTests": 0, 1637 | "numPassingTests": 8, 1638 | "numPendingTests": 0, 1639 | "perfStats": { 1640 | "end": 1495637922735, 1641 | "start": 1495637922531 1642 | }, 1643 | "snapshot": { 1644 | "added": 0, 1645 | "fileDeleted": false, 1646 | "matched": 0, 1647 | "unchecked": 0, 1648 | "unmatched": 0, 1649 | "updated": 0 1650 | }, 1651 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/runner/_tests/_danger_utils.test.ts", 1652 | "testResults": [ 1653 | { 1654 | "ancestorTitles": ["sentence()"], 1655 | "duration": 2, 1656 | "failureMessages": [], 1657 | "fullName": "sentence() handles falsy input", 1658 | "numPassingAsserts": 0, 1659 | "status": "passed", 1660 | "title": "handles falsy input" 1661 | }, 1662 | { 1663 | "ancestorTitles": ["sentence()"], 1664 | "duration": 1, 1665 | "failureMessages": [], 1666 | "fullName": "sentence() handles empty array", 1667 | "numPassingAsserts": 0, 1668 | "status": "passed", 1669 | "title": "handles empty array" 1670 | }, 1671 | { 1672 | "ancestorTitles": ["sentence()"], 1673 | "duration": 1, 1674 | "failureMessages": [], 1675 | "fullName": "sentence() handles array with one item", 1676 | "numPassingAsserts": 0, 1677 | "status": "passed", 1678 | "title": "handles array with one item" 1679 | }, 1680 | { 1681 | "ancestorTitles": ["sentence()"], 1682 | "duration": 0, 1683 | "failureMessages": [], 1684 | "fullName": "sentence() handles array with multiple items", 1685 | "numPassingAsserts": 0, 1686 | "status": "passed", 1687 | "title": "handles array with multiple items" 1688 | }, 1689 | { 1690 | "ancestorTitles": ["href()"], 1691 | "duration": 0, 1692 | "failureMessages": [], 1693 | "fullName": "href() returns null when href and text are falsy", 1694 | "numPassingAsserts": 0, 1695 | "status": "passed", 1696 | "title": "returns null when href and text are falsy" 1697 | }, 1698 | { 1699 | "ancestorTitles": ["href()"], 1700 | "duration": 1, 1701 | "failureMessages": [], 1702 | "fullName": "href() returns just the text when the href is missing", 1703 | "numPassingAsserts": 0, 1704 | "status": "passed", 1705 | "title": "returns just the text when the href is missing" 1706 | }, 1707 | { 1708 | "ancestorTitles": ["href()"], 1709 | "duration": 1, 1710 | "failureMessages": [], 1711 | "fullName": "href() returns tag with href as text when text is missing", 1712 | "numPassingAsserts": 0, 1713 | "status": "passed", 1714 | "title": "returns tag with href as text when text is missing" 1715 | }, 1716 | { 1717 | "ancestorTitles": ["href()"], 1718 | "duration": 1, 1719 | "failureMessages": [], 1720 | "fullName": "href() returns tag for supplied href and text", 1721 | "numPassingAsserts": 0, 1722 | "status": "passed", 1723 | "title": "returns tag for supplied href and text" 1724 | } 1725 | ], 1726 | "sourceMaps": {}, 1727 | "skipped": false 1728 | }, 1729 | { 1730 | "console": null, 1731 | "failureMessage": null, 1732 | "numFailingTests": 0, 1733 | "numPassingTests": 12, 1734 | "numPendingTests": 0, 1735 | "perfStats": { 1736 | "end": 1495637927284, 1737 | "start": 1495637917972 1738 | }, 1739 | "snapshot": { 1740 | "added": 0, 1741 | "fileDeleted": false, 1742 | "matched": 1, 1743 | "unchecked": 0, 1744 | "unmatched": 0, 1745 | "updated": 0 1746 | }, 1747 | "testFilePath": "/Users/macklinu/dev/danger/danger-js/source/runner/_tests/_danger_runner.test.ts", 1748 | "testResults": [ 1749 | { 1750 | "ancestorTitles": ["with fixtures"], 1751 | "duration": 6686, 1752 | "failureMessages": [], 1753 | "fullName": "with fixtures handles a blank Dangerfile", 1754 | "numPassingAsserts": 0, 1755 | "status": "passed", 1756 | "title": "handles a blank Dangerfile" 1757 | }, 1758 | { 1759 | "ancestorTitles": ["with fixtures"], 1760 | "duration": 33, 1761 | "failureMessages": [], 1762 | "fullName": "with fixtures handles a full set of messages", 1763 | "numPassingAsserts": 0, 1764 | "status": "passed", 1765 | "title": "handles a full set of messages" 1766 | }, 1767 | { 1768 | "ancestorTitles": ["with fixtures"], 1769 | "duration": 19, 1770 | "failureMessages": [], 1771 | "fullName": "with fixtures handles a failing dangerfile", 1772 | "numPassingAsserts": 0, 1773 | "status": "passed", 1774 | "title": "handles a failing dangerfile" 1775 | }, 1776 | { 1777 | "ancestorTitles": ["with fixtures"], 1778 | "duration": 86, 1779 | "failureMessages": [], 1780 | "fullName": "with fixtures handles relative imports correctly", 1781 | "numPassingAsserts": 0, 1782 | "status": "passed", 1783 | "title": "handles relative imports correctly" 1784 | }, 1785 | { 1786 | "ancestorTitles": ["with fixtures"], 1787 | "duration": 32, 1788 | "failureMessages": [], 1789 | "fullName": "with fixtures handles scheduled (async) code", 1790 | "numPassingAsserts": 0, 1791 | "status": "passed", 1792 | "title": "handles scheduled (async) code" 1793 | }, 1794 | { 1795 | "ancestorTitles": ["with fixtures"], 1796 | "duration": 147, 1797 | "failureMessages": [], 1798 | "fullName": "with fixtures handles multiple scheduled statements and all message types", 1799 | "numPassingAsserts": 0, 1800 | "status": "passed", 1801 | "title": "handles multiple scheduled statements and all message types" 1802 | }, 1803 | { 1804 | "ancestorTitles": ["with fixtures"], 1805 | "duration": 16, 1806 | "failureMessages": [], 1807 | "fullName": "with fixtures can schedule callback-based promised", 1808 | "numPassingAsserts": 0, 1809 | "status": "passed", 1810 | "title": "can schedule callback-based promised" 1811 | }, 1812 | { 1813 | "ancestorTitles": ["with fixtures"], 1814 | "duration": 546, 1815 | "failureMessages": [], 1816 | "fullName": "with fixtures can handle TypeScript based Dangerfiles", 1817 | "numPassingAsserts": 0, 1818 | "status": "passed", 1819 | "title": "can handle TypeScript based Dangerfiles" 1820 | }, 1821 | { 1822 | "ancestorTitles": ["cleaning Dangerfiles"], 1823 | "duration": 2, 1824 | "failureMessages": [], 1825 | "fullName": "cleaning Dangerfiles Supports removing the danger import", 1826 | "numPassingAsserts": 0, 1827 | "status": "passed", 1828 | "title": "Supports removing the danger import" 1829 | }, 1830 | { 1831 | "ancestorTitles": ["cleaning Dangerfiles"], 1832 | "duration": 2, 1833 | "failureMessages": [], 1834 | "fullName": "cleaning Dangerfiles also handles typescript style imports", 1835 | "numPassingAsserts": 0, 1836 | "status": "passed", 1837 | "title": "also handles typescript style imports" 1838 | }, 1839 | { 1840 | "ancestorTitles": ["cleaning Dangerfiles"], 1841 | "duration": 0, 1842 | "failureMessages": [], 1843 | "fullName": "cleaning Dangerfiles also handles require style imports", 1844 | "numPassingAsserts": 0, 1845 | "status": "passed", 1846 | "title": "also handles require style imports" 1847 | }, 1848 | { 1849 | "ancestorTitles": [], 1850 | "duration": 7, 1851 | "failureMessages": [], 1852 | "fullName": "creates a working jest config", 1853 | "numPassingAsserts": 0, 1854 | "status": "passed", 1855 | "title": "creates a working jest config" 1856 | } 1857 | ], 1858 | "sourceMaps": {}, 1859 | "skipped": false 1860 | } 1861 | ], 1862 | "wasInterrupted": false 1863 | } 1864 | -------------------------------------------------------------------------------- /src/__tests__/fails.test.ts: -------------------------------------------------------------------------------- 1 | it.skip('Fails 1', () => { 2 | expect(1).toEqual(2) 3 | }) 4 | 5 | it.skip('Fails 2', () => { 6 | expect(' asdasd').toBeLessThanOrEqual(2) 7 | }) 8 | 9 | it.skip('Fails 4', () => { 10 | expect({ a: 'asda' }).toBeFalsy() 11 | }) 12 | -------------------------------------------------------------------------------- /src/__tests__/index.test.ts: -------------------------------------------------------------------------------- 1 | import * as path from 'path' 2 | 3 | import jestResults from '..' 4 | 5 | beforeEach(() => { 6 | global['message'] = jest.fn() 7 | global['fail'] = jest.fn() 8 | global['warn'] = jest.fn() 9 | global['danger'] = { 10 | github: { 11 | pr: { 12 | head: { 13 | ref: 'branch', 14 | repo: { 15 | full_name: 'repo/slug', 16 | html_url: 'https://github.com/user', 17 | owner: { 18 | login: 'user', 19 | }, 20 | }, 21 | }, 22 | }, 23 | utils: { 24 | fileLinks: (a: any) => a, 25 | }, 26 | }, 27 | } 28 | }) 29 | 30 | test('no fails with passing test results', () => { 31 | jestResults({ 32 | testResultsJsonPath: fixture('passing-tests.json'), 33 | }) 34 | expect(global['fail']).not.toHaveBeenCalled() 35 | }) 36 | 37 | test('passing test results with visible success message', () => { 38 | jestResults({ 39 | testResultsJsonPath: fixture('passing-tests.json'), 40 | showSuccessMessage: true, 41 | }) 42 | expect(global['message']).toHaveBeenCalledWith( 43 | expect.stringMatching(/Jest tests passed/) 44 | ) 45 | }) 46 | 47 | test('passing test results without visible success message', () => { 48 | jestResults({ 49 | testResultsJsonPath: fixture('passing-tests.json'), 50 | }) 51 | expect(global['message']).not.toHaveBeenCalled() 52 | }) 53 | 54 | test('fails with failing test results', () => { 55 | jestResults({ 56 | testResultsJsonPath: fixture('failing-tests.json'), 57 | }) 58 | expect(global['fail']).toHaveBeenCalledWith(expect.stringMatching(/FAIL/)) 59 | }) 60 | 61 | test('fails with failing test results from jest 20', () => { 62 | jestResults({ 63 | testResultsJsonPath: fixture('failed-tests-j20.json'), 64 | }) 65 | expect(global['fail']).toHaveBeenCalledWith(expect.stringMatching(/FAIL/)) 66 | }) 67 | 68 | test('warns when test results JSON file cannot be read', () => { 69 | jestResults({ 70 | testResultsJsonPath: fixture('nonexistent.json'), 71 | }) 72 | expect(global['fail']).toHaveBeenCalled() 73 | }) 74 | 75 | test('can create links for github', () => { 76 | jestResults({ 77 | testResultsJsonPath: fixture('failing-tests.json'), 78 | }) 79 | expect(global['fail']).toHaveBeenCalledWith( 80 | expect.stringMatching( 81 | /https:\/\/github.com\/repo\/slug\/blob\/branch\/(.*)?\/file-utils.test.ts#L24/ 82 | ) 83 | ) 84 | }) 85 | 86 | test('can create links for hosted github', () => { 87 | global['danger'].github.pr.head.repo.html_url = 88 | 'https://mydomain.github.com/user' 89 | jestResults({ 90 | testResultsJsonPath: fixture('failing-tests.json'), 91 | }) 92 | expect(global['fail']).toHaveBeenCalledWith( 93 | expect.stringMatching( 94 | /https:\/\/mydomain.github.com\/repo\/slug\/blob\/branch\/(.*)?\/file-utils.test.ts#L24/ 95 | ) 96 | ) 97 | }) 98 | 99 | test.skip('Fails 6', () => { 100 | expect({ v: 'asda' }).toContain('s') 101 | }) 102 | 103 | const fixture = (filename: string) => 104 | path.resolve(__dirname, '__fixtures__', filename) 105 | -------------------------------------------------------------------------------- /src/ambient.d.ts: -------------------------------------------------------------------------------- 1 | // Global Danger functions 2 | declare function warn(message: string): void 3 | declare function fail(message: string): void 4 | declare function message(message: string): void 5 | 6 | declare module 'strip-ansi' 7 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import * as fs from 'fs' 2 | import * as path from 'path' 3 | 4 | import * as stripANSI from 'strip-ansi' 5 | 6 | import { DangerDSLType } from '../node_modules/danger/distribution/dsl/DangerDSL' 7 | import { 8 | IInsideFileTestResults, 9 | IJestTestOldResults, 10 | IJestTestResults, 11 | } from './types' 12 | declare var danger: DangerDSLType 13 | declare function fail(message?: string): void 14 | declare function message(message?: string): void 15 | 16 | export interface IPluginConfig { 17 | testResultsJsonPath: string 18 | showSuccessMessage: boolean 19 | } 20 | 21 | export default function jest(config: Partial = {}) { 22 | const { 23 | testResultsJsonPath = 'test-results.json', 24 | showSuccessMessage = false, 25 | } = config 26 | try { 27 | const jsonFileContents = fs.readFileSync(testResultsJsonPath, 'utf8') 28 | const jsonResults: IJestTestResults = JSON.parse(jsonFileContents) 29 | if (jsonResults.success) { 30 | jestSuccessFeedback(jsonResults, showSuccessMessage) 31 | return 32 | } 33 | 34 | const isModernFormatResults = jsonResults.testResults[0].testResults 35 | if (isModernFormatResults) { 36 | presentErrorsForNewStyleResults(jsonResults) 37 | } else { 38 | presentErrorsForOldStyleResults(jsonResults as any) 39 | } 40 | } catch (e) { 41 | // tslint:disable-next-line:no-console 42 | console.error(e) 43 | fail( 44 | '[danger-plugin-jest] Could not read test results. Danger cannot pass or fail the build.' 45 | ) 46 | } 47 | } 48 | 49 | const jestSuccessFeedback = ( 50 | jsonResults: IJestTestResults, 51 | showSuccessMessage: boolean 52 | ): void => { 53 | if (!showSuccessMessage) { 54 | // tslint:disable-next-line:no-console 55 | console.log(':+1: Jest tests passed') 56 | } else { 57 | message( 58 | `:+1: Jest tests passed: ${jsonResults.numPassedTests}/${jsonResults.numTotalTests} (${jsonResults.numPendingTests} skipped)` 59 | ) 60 | } 61 | } 62 | 63 | const presentErrorsForOldStyleResults = (jsonResults: IJestTestOldResults) => { 64 | const failing = jsonResults.testResults.filter(tr => tr.status === 'failed') 65 | 66 | failing.forEach(results => { 67 | const relativeFilePath = path.relative(process.cwd(), results.name) 68 | const failedAssertions = results.assertionResults.filter( 69 | r => r.status === 'failed' 70 | ) 71 | const failMessage = fileToFailString( 72 | relativeFilePath, 73 | failedAssertions as any 74 | ) 75 | fail(failMessage) 76 | }) 77 | } 78 | 79 | const presentErrorsForNewStyleResults = (jsonResults: IJestTestResults) => { 80 | const failing = jsonResults.testResults.filter(tr => tr.numFailingTests > 0) 81 | 82 | failing.forEach(results => { 83 | const relativeFilePath = path.relative(process.cwd(), results.testFilePath) 84 | const failedAssertions = results.testResults.filter( 85 | r => r.status === 'failed' 86 | ) 87 | const failMessage = fileToFailString(relativeFilePath, failedAssertions) 88 | fail(failMessage) 89 | }) 90 | } 91 | 92 | // e.g. https://github.com/orta/danger-plugin-jest/blob/master/src/__tests__/fails.test.ts 93 | const linkToTest = (file: string, msg: string, title: string) => { 94 | const line = lineOfError(msg, file) 95 | const githubRoot = danger.github.pr.head.repo.html_url.split( 96 | danger.github.pr.head.repo.owner.login 97 | )[0] 98 | const repo = danger.github.pr.head.repo 99 | const url = `${githubRoot}${repo.full_name}/blob/${ 100 | danger.github.pr.head.ref 101 | }/${file}${line ? `#L${line}` : ''}` 102 | return `${title}` 103 | } 104 | 105 | const assertionFailString = ( 106 | file: string, 107 | status: IInsideFileTestResults 108 | ): string => ` 109 |
  • 110 | ${linkToTest( 111 | file, 112 | status.failureMessages && status.failureMessages[0], 113 | status.title 114 | )} 115 |
    116 | ${sanitizeShortErrorMessage( 117 | status.failureMessages && stripANSI(status.failureMessages[0]) 118 | )} 119 | 120 |
    121 | Full message 122 |
    
    123 | ${status.failureMessages && stripANSI(status.failureMessages.join('\n'))}
    124 | 
    125 |
    126 |
  • 127 |
    128 | ` 129 | 130 | const fileToFailString = ( 131 | // tslint:disable-next-line:no-shadowed-variable 132 | path: string, 133 | failedAssertions: IInsideFileTestResults[] 134 | ): string => ` 135 | 🃏 FAIL in ${danger.github.utils.fileLinks([path])} 136 | 137 | ${failedAssertions.map(a => assertionFailString(path, a)).join('\n\n')} 138 | ` 139 | 140 | const lineOfError = (msg: string, filePath: string): number | null => { 141 | const filename = path.basename(filePath) 142 | const restOfTrace = msg.split(filename, 2)[1] 143 | return restOfTrace ? parseInt(restOfTrace.split(':')[1], 10) : null 144 | } 145 | 146 | const sanitizeShortErrorMessage = (msg: string): string => { 147 | if (msg.includes('does not match stored snapshot')) { 148 | return 'Snapshot has changed' 149 | } 150 | 151 | return msg 152 | .split(' at', 1)[0] 153 | .trim() 154 | .split('\n') 155 | .splice(2) 156 | .join('') 157 | .replace(/\s\s+/g, ' ') 158 | .replace('Received:', ', received:') 159 | .replace('., received', ', received') 160 | .split('Difference:')[0] 161 | } 162 | -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- 1 | export interface ISnapshot { 2 | added: number 3 | didUpdate: boolean 4 | failure: boolean 5 | filesAdded: number 6 | filesRemoved: number 7 | filesUnmatched: number 8 | filesUpdated: number 9 | matched: number 10 | total: number 11 | unchecked: number 12 | unmatched: number 13 | updated: number 14 | } 15 | 16 | export interface IPerfStats { 17 | end: any 18 | start: any 19 | } 20 | 21 | export interface ISnapshot2 { 22 | added: number 23 | fileDeleted: boolean 24 | matched: number 25 | unchecked: number 26 | unmatched: number 27 | updated: number 28 | } 29 | 30 | export interface IInsideFileTestResults { 31 | ancestorTitles: string[] 32 | duration: number 33 | failureMessages: string[] 34 | fullName: string 35 | numPassingAsserts: number 36 | status: string 37 | title: string 38 | } 39 | 40 | export interface IFileTestResult { 41 | console?: any 42 | failureMessage: string 43 | numFailingTests: number 44 | numPassingTests: number 45 | numPendingTests: number 46 | perfStats: IPerfStats 47 | snapshot: ISnapshot2 48 | testFilePath: string 49 | testResults: IInsideFileTestResults[] 50 | sourceMaps: {} 51 | skipped: boolean 52 | // These are from IAssertionResult 53 | status?: string 54 | title?: string 55 | } 56 | 57 | export interface IJestTestResults { 58 | numFailedTestSuites: number 59 | numFailedTests: number 60 | numPassedTestSuites: number 61 | numPassedTests: number 62 | numPendingTestSuites: number 63 | numPendingTests: number 64 | numRuntimeErrorTestSuites: number 65 | numTotalTestSuites: number 66 | numTotalTests: number 67 | snapshot: ISnapshot 68 | startTime: number 69 | success: boolean 70 | testResults: IFileTestResult[] 71 | wasInterrupted: boolean 72 | } 73 | 74 | export interface IAssertionResult { 75 | failureMessages: string[] 76 | status: string 77 | title: string 78 | } 79 | 80 | export interface ITestResult { 81 | assertionResults: IAssertionResult[] 82 | endTime: any 83 | message: string 84 | name: string 85 | startTime: any 86 | status: string 87 | summary: string 88 | } 89 | 90 | export interface IJestTestOldResults { 91 | numFailedTestSuites: number 92 | numFailedTests: number 93 | numPassedTestSuites: number 94 | numPassedTests: number 95 | numPendingTestSuites: number 96 | numPendingTests: number 97 | numRuntimeErrorTestSuites: number 98 | numTotalTestSuites: number 99 | numTotalTests: number 100 | snapshot: ISnapshot 101 | startTime: number 102 | success: boolean 103 | testResults: ITestResult[] 104 | wasInterrupted: boolean 105 | } 106 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "declarationDir": "dist", 5 | "lib": ["es5", "es2015", "es2017"], 6 | "module": "commonjs", 7 | "moduleResolution": "node", 8 | "strict": true, 9 | "noUnusedLocals": true, 10 | "noUnusedParameters": true, 11 | "outDir": "dist", 12 | "pretty": true, 13 | "sourceMap": false, 14 | "strictNullChecks": true, 15 | "suppressImplicitAnyIndexErrors": true, 16 | "target": "es5" 17 | }, 18 | "include": ["src/**/*.ts"], 19 | "exclude": ["node_modules", "src/**/*.test.ts"] 20 | } 21 | --------------------------------------------------------------------------------