Tests: require 100% branch coverage to pass

Remove old coverage tooling, coveralls
This commit is contained in:
Lovell Fuller
2022-09-27 13:49:42 +01:00
parent b0c69f1ee9
commit 2d49f0e93e
6 changed files with 12 additions and 29 deletions

View File

@@ -511,15 +511,12 @@ function trim (trim) {
}
} else if (is.object(trim)) {
this._setBackgroundColourOption('trimBackground', trim.background);
if (!is.defined(trim.threshold)) {
this.options.trimThreshold = 10;
} else if (is.number(trim.threshold)) {
if (trim.threshold >= 0) {
this.options.trimThreshold = trim.threshold;
} else {
throw is.invalidParameterError('threshold', 'positive number', trim);
}
} else if (is.number(trim.threshold) && trim.threshold >= 0) {
this.options.trimThreshold = trim.threshold;
} else {
throw is.invalidParameterError('threshold', 'positive number', trim);
}
} else {
throw is.invalidParameterError('trim', 'string, number or object', trim);