qase-javascript-commons 2.4.7 → 2.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +6 -0
- package/dist/utils/test-status-utils.js +13 -2
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -67,11 +67,22 @@ function isAssertionError(error) {
|
|
|
67
67
|
'server error',
|
|
68
68
|
'internal error'
|
|
69
69
|
];
|
|
70
|
-
//
|
|
71
|
-
const
|
|
70
|
+
// Special case: timeout errors with expect should be treated as assertion errors
|
|
71
|
+
const isTimeoutWithExpect = errorMessage.includes('timeout') &&
|
|
72
|
+
errorMessage.includes('expect');
|
|
73
|
+
if (isTimeoutWithExpect) {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
// Check for non-assertion patterns (excluding timeout for special handling above)
|
|
77
|
+
const nonAssertionPatternsWithoutTimeout = nonAssertionPatterns.filter(pattern => pattern !== 'timeout');
|
|
78
|
+
const hasNonAssertionPattern = nonAssertionPatternsWithoutTimeout.some(pattern => errorMessage.includes(pattern) || errorStack.includes(pattern));
|
|
72
79
|
if (hasNonAssertionPattern) {
|
|
73
80
|
return false;
|
|
74
81
|
}
|
|
82
|
+
// For timeout errors without expect, treat as invalid
|
|
83
|
+
if (errorMessage.includes('timeout')) {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
75
86
|
// Check error message and stack for assertion patterns
|
|
76
87
|
const hasAssertionPattern = assertionPatterns.some(pattern => errorMessage.includes(pattern) || errorStack.includes(pattern));
|
|
77
88
|
// Check for specific error types that indicate assertions
|