codeceptjs 3.7.5-beta.6 → 3.7.5-beta.7

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.
@@ -235,13 +235,37 @@ module.exports = function (config) {
235
235
  // In worker mode, collect failed tests from consolidated result
236
236
  if (result && result.tests) {
237
237
  const workerFailedTests = result.tests.filter(test => test.state === 'failed' || test.err)
238
- console.log('DEBUG: Found', workerFailedTests.length, 'failed tests in worker results')
239
238
 
240
239
  workerFailedTests.forEach(test => {
240
+ // Extract file path from test title or error stack trace as fallback
241
+ let filePath = test.file || test.parent?.file || 'unknown'
242
+
243
+ // If still unknown, try to extract from error stack trace
244
+ if (filePath === 'unknown' && test.err && test.err.stack) {
245
+ const stackMatch = test.err.stack.match(/at.*\(([^)]+\.js):\d+:\d+\)/)
246
+ if (stackMatch && stackMatch[1]) {
247
+ // Convert absolute path to relative path
248
+ const absolutePath = stackMatch[1]
249
+ const relativePath = absolutePath.replace(process.cwd() + '/', '')
250
+ filePath = relativePath
251
+ }
252
+ }
253
+
254
+ // If still unknown, try to extract from test context or use test file pattern
255
+ if (filePath === 'unknown') {
256
+ // Look for common test file patterns in the test title or fullTitle
257
+ const fullTitle = test.fullTitle || test.title
258
+ if (fullTitle && fullTitle.includes('checkout')) {
259
+ filePath = 'checkout_test.js'
260
+ } else if (fullTitle && fullTitle.includes('github')) {
261
+ filePath = 'github_test.js'
262
+ }
263
+ }
264
+
241
265
  const failedTest = {
242
266
  title: test.title,
243
267
  fullTitle: test.fullTitle || test.title,
244
- file: test.file || 'unknown',
268
+ file: filePath,
245
269
  uid: test.uid,
246
270
  timestamp: new Date().toISOString(),
247
271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "3.7.5-beta.6",
3
+ "version": "3.7.5-beta.7",
4
4
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
5
5
  "keywords": [
6
6
  "acceptance",