mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
feat: add validation for the collapsed input parameter
Generated-by: Claude Sonnet 4.5
This commit is contained in:
parent
5fb0582760
commit
c7935221e6
2 changed files with 9 additions and 0 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
|
@ -323,6 +323,10 @@ class TestReporter {
|
||||||
core.setFailed(`Input parameter 'list-tests' has invalid value`);
|
core.setFailed(`Input parameter 'list-tests' has invalid value`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (this.collapsed !== 'auto' && this.collapsed !== 'always' && this.collapsed !== 'never') {
|
||||||
|
core.setFailed(`Input parameter 'collapsed' has invalid value`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) {
|
if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) {
|
||||||
core.setFailed(`Input parameter 'max-annotations' has invalid value`);
|
core.setFailed(`Input parameter 'max-annotations' has invalid value`);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,11 @@ class TestReporter {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.collapsed !== 'auto' && this.collapsed !== 'always' && this.collapsed !== 'never') {
|
||||||
|
core.setFailed(`Input parameter 'collapsed' has invalid value`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) {
|
if (isNaN(this.maxAnnotations) || this.maxAnnotations < 0 || this.maxAnnotations > 50) {
|
||||||
core.setFailed(`Input parameter 'max-annotations' has invalid value`)
|
core.setFailed(`Input parameter 'max-annotations' has invalid value`)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue