codeceptjs 4.0.1-beta.12 → 4.0.1-beta.14

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/bin/codecept.js CHANGED
@@ -174,7 +174,7 @@ program
174
174
  .option('-R, --reporter <name>', 'specify the reporter to use')
175
175
  .option('-S, --sort', 'sort test files')
176
176
  .option('-b, --bail', 'bail after first test failure')
177
- .option('-d, --debug', "enable node's debugger, synonym for node --debug")
177
+ .option('--inspec', "enable node's debugger, synonym for node --debug")
178
178
  .option('-g, --grep <pattern>', 'only run tests matching <pattern>')
179
179
  .option('-f, --fgrep <string>', 'only run tests containing <string>')
180
180
  .option('-i, --invert', 'inverts --grep and --fgrep matches')
@@ -276,7 +276,7 @@ program
276
276
  .option('-R, --reporter <name>', 'specify the reporter to use')
277
277
  .option('-S, --sort', 'sort test files')
278
278
  .option('-b, --bail', 'bail after first test failure')
279
- .option('-d, --debug', "enable node's debugger, synonym for node --debug")
279
+ .option('--inspect', "enable node's debugger, synonym for node --debug")
280
280
  .option('-g, --grep <pattern>', 'only run tests matching <pattern>')
281
281
  .option('-f, --fgrep <string>', 'only run tests containing <string>')
282
282
  .option('-i, --invert', 'inverts --grep and --fgrep matches')
@@ -1389,6 +1389,7 @@ class Playwright extends Helper {
1389
1389
  }
1390
1390
  }
1391
1391
 
1392
+ // Close browserContext if recordHar is enabled
1392
1393
  if (this.options.recordHar && this.browserContext) {
1393
1394
  try {
1394
1395
  await this.browserContext.close()
@@ -1398,16 +1399,16 @@ class Playwright extends Helper {
1398
1399
  }
1399
1400
  this.browserContext = null
1400
1401
 
1402
+ // Initiate browser close without waiting for it to complete
1403
+ // The browser process will be cleaned up when the Node process exits
1401
1404
  if (this.browser) {
1402
1405
  try {
1403
- // Add timeout to prevent browser.close() from hanging indefinitely
1404
- await Promise.race([this.browser.close(), new Promise((_, reject) => setTimeout(() => reject(new Error('Browser close timeout')), 5000))])
1406
+ // Fire and forget - don't wait for close to complete
1407
+ this.browser.close().catch(() => {
1408
+ // Silently ignore any errors during async close
1409
+ })
1405
1410
  } catch (e) {
1406
- // Ignore errors if browser is already closed or timeout
1407
- if (!e.message?.includes('Browser close timeout')) {
1408
- // Non-timeout error, can be ignored as well
1409
- }
1410
- // Force cleanup even on error
1411
+ // Ignore any synchronous errors
1411
1412
  }
1412
1413
  }
1413
1414
  this.browser = null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeceptjs",
3
- "version": "4.0.1-beta.12",
3
+ "version": "4.0.1-beta.14",
4
4
  "type": "module",
5
5
  "description": "Supercharged End 2 End Testing Framework for NodeJS",
6
6
  "keywords": [
@@ -98,7 +98,7 @@
98
98
  "chalk": "4.1.2",
99
99
  "cheerio": "^1.0.0",
100
100
  "chokidar": "^4.0.3",
101
- "commander": "11.1.0",
101
+ "commander": "14.0.2",
102
102
  "cross-spawn": "7.0.6",
103
103
  "css-to-xpath": "0.1.0",
104
104
  "csstoxpath": "1.6.0",
@@ -144,7 +144,7 @@
144
144
  "@pollyjs/adapter-puppeteer": "6.0.6",
145
145
  "@pollyjs/core": "6.0.6",
146
146
  "@testomatio/reporter": "^2.3.1",
147
- "@types/chai": "5.2.2",
147
+ "@types/chai": "5.2.3",
148
148
  "@types/inquirer": "9.0.9",
149
149
  "@types/node": "^24.9.2",
150
150
  "@wdio/sauce-service": "9.12.5",
@@ -152,8 +152,8 @@
152
152
  "@wdio/utils": "9.20.0",
153
153
  "@xmldom/xmldom": "0.9.8",
154
154
  "bunosh": "latest",
155
- "chai": "^4.5.0",
156
- "chai-as-promised": "7.1.2",
155
+ "chai": "^6.2.1",
156
+ "chai-as-promised": "^8.0.2",
157
157
  "chai-subset": "1.6.0",
158
158
  "documentation": "14.0.3",
159
159
  "electron": "38.2.0",
@@ -178,7 +178,7 @@
178
178
  "runok": "^0.9.3",
179
179
  "semver": "7.7.3",
180
180
  "sinon": "21.0.0",
181
- "sinon-chai": "3.7.0",
181
+ "sinon-chai": "^4.0.1",
182
182
  "ts-morph": "27.0.2",
183
183
  "ts-node": "10.9.2",
184
184
  "tsd": "^0.33.0",