Skip to content

Commit

Permalink
Merge pull request #191 from GuillaumeAmat/fix-warnings
Browse files Browse the repository at this point in the history
fix: display warnings even if no errors
  • Loading branch information
denar90 authored Sep 24, 2018
2 parents 757e057 + 396ddc1 commit 432b65c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ class PWMetrics {
return false;
}
const expectedErrorLimit = expectation.error;
return expectedErrorLimit !== undefined && timing.timing >= expectedErrorLimit;
const expectedWarningLimit = expectation.warn;
const hasErrors = expectedErrorLimit !== undefined && timing.timing >= expectedErrorLimit;
const hasWarnings = expectedWarningLimit !== undefined && timing.timing >= expectedWarningLimit;
return hasErrors || hasWarnings;
});
}

Expand Down

0 comments on commit 432b65c

Please sign in to comment.