Skip to content

Commit

Permalink
chore(flakiness-dashboard): skip API Coverage for realz (#4843)
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov authored Aug 13, 2019
1 parent 5d2378f commit d687c81
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const path = require('path');
const {FlakinessDashboard} = require('../utils/flakiness-dashboard');
const PROJECT_ROOT = fs.existsSync(path.join(__dirname, '..', 'package.json')) ? path.join(__dirname, '..') : path.join(__dirname, '..', '..');

const COVERAGE_TESTSUITE_NAME = '**API COVERAGE**';

/**
* @param {Map<string, boolean>} apiCoverage
* @param {Object} events
Expand Down Expand Up @@ -57,7 +59,7 @@ const utils = module.exports = {
const coverage = new Map();
for (const [className, classType] of Object.entries(api))
traceAPICoverage(coverage, events, className, classType);
testRunner.describe('COVERAGE', () => {
testRunner.describe(COVERAGE_TESTSUITE_NAME, () => {
testRunner.it('should call all API methods', () => {
const missingMethods = [];
for (const method of coverage.keys()) {
Expand Down Expand Up @@ -203,7 +205,7 @@ const utils = module.exports = {
testRunner.on('testfinished', test => {
// Do not report tests from COVERAGE testsuite.
// They don't bring much value to us.
if (test.fullName.startsWith('COVERAGE'))
if (test.fullName.includes(COVERAGE_TESTSUITE_NAME))
return;
const testpath = test.location.filePath.substring(utils.projectRoot().length);
const url = `https://github.com/GoogleChrome/puppeteer/blob/${sha}/${testpath}#L${test.location.lineNumber}`;
Expand Down

0 comments on commit d687c81

Please sign in to comment.