| 183 | |
| 184 | // Compare the number of entries with what was expected |
| 185 | checkExpected (entries) { |
| 186 | if (!this.npm.config.isDefault('expect-results')) { |
| 187 | const expected = this.npm.config.get('expect-results') |
| 188 | if (!!entries !== !!expected) { |
| 189 | log.warn(this.name, `Expected ${expected ? '' : 'no '}results, got ${entries}`) |
| 190 | process.exitCode = 1 |
| 191 | } |
| 192 | } else if (!this.npm.config.isDefault('expect-result-count')) { |
| 193 | const expected = this.npm.config.get('expect-result-count') |
| 194 | if (expected !== entries) { |
| 195 | log.warn(this.name, `Expected ${expected} result${expected === 1 ? '' : 's'}, got ${entries}`) |
| 196 | process.exitCode = 1 |
| 197 | } |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | // Checks the devEngines entry in the package.json at this.localPrefix |
| 202 | async checkDevEngines () { |