Skip to content

Commit 1df1f9a

Browse files
committed
Merge branch '3.x' into feat/storageState-playwright
2 parents 1570463 + 2505ac7 commit 1df1f9a

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

lib/codecept.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,16 @@ class Codecept {
122122
/**
123123
* Executes bootstrap.
124124
*
125+
* @returns {Promise<void>}
125126
*/
126127
async bootstrap() {
127128
return runHook(this.config.bootstrap, 'bootstrap')
128129
}
129130

130131
/**
131132
* Executes teardown.
132-
133+
*
134+
* @returns {Promise<void>}
133135
*/
134136
async teardown() {
135137
return runHook(this.config.teardown, 'teardown')
@@ -262,6 +264,11 @@ class Codecept {
262264
})
263265
}
264266

267+
/**
268+
* Returns the version string of CodeceptJS.
269+
*
270+
* @returns {string} The version string.
271+
*/
265272
static version() {
266273
return JSON.parse(readFileSync(`${__dirname}/../package.json`, 'utf8')).version
267274
}

lib/command/workers/runTests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ if (poolMode && !options.debug) {
2929
// In pool mode without debug, suppress only result summaries and failures, but allow Scenario Steps
3030
const originalWrite = process.stdout.write
3131
process.stdout.write = string => {
32-
// Always allow Scenario Steps output
33-
if (string.includes('Scenario Steps:')) {
32+
// Always allow Scenario Steps output (including the circle symbol)
33+
if (string.includes('Scenario Steps:') || string.includes('◯ Scenario Steps:')) {
3434
return originalWrite.call(process.stdout, string)
3535
}
3636
if (string.includes(' FAIL |') || string.includes(' OK |') || string.includes('-- FAILURES:') || string.includes('AssertionError:') || string.includes('◯ File:')) {

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"cross-spawn": "7.0.6",
9797
"css-to-xpath": "0.1.0",
9898
"csstoxpath": "1.6.0",
99-
"envinfo": "7.14.0",
99+
"envinfo": "7.15.0",
100100
"escape-string-regexp": "4.0.0",
101101
"figures": "3.2.0",
102102
"fn-args": "4.0.0",
@@ -138,7 +138,7 @@
138138
"@pollyjs/core": "6.0.6",
139139
"@types/chai": "5.2.2",
140140
"@types/inquirer": "9.0.9",
141-
"@types/node": "24.5.2",
141+
"@types/node": "24.6.0",
142142
"@wdio/sauce-service": "9.12.5",
143143
"@wdio/selenium-standalone-service": "8.15.0",
144144
"@wdio/utils": "9.19.2",
@@ -147,11 +147,11 @@
147147
"chai-as-promised": "7.1.2",
148148
"chai-subset": "1.6.0",
149149
"documentation": "14.0.3",
150-
"electron": "38.1.2",
150+
"electron": "38.2.0",
151151
"eslint": "^9.36.0",
152152
"eslint-plugin-import": "2.32.0",
153153
"eslint-plugin-mocha": "11.1.0",
154-
"expect": "30.1.2",
154+
"expect": "30.2.0",
155155
"express": "^5.1.0",
156156
"globals": "16.4.0",
157157
"graphql": "16.11.0",

test/runner/run_workers_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ describe('CodeceptJS Workers Runner', function () {
175175
let createdOutput = false
176176

177177
if (fs.existsSync(outputDir)) {
178-
fs.rmdirSync(outputDir, { recursive: true })
178+
fs.rmSync(outputDir, { recursive: true, force: true })
179179
}
180180

181181
if (!semver.satisfies(process.version, '>=11.7.0')) this.skip('not for node version')

typings/index.d.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ declare namespace CodeceptJS {
9797
* tests: 'tests/**.test.ts'
9898
* ```
9999
*/
100-
tests: string
100+
tests: string | string[]
101101
/**
102102
* Where to store failure screenshots, artifacts, etc
103103
*
@@ -520,17 +520,16 @@ declare namespace CodeceptJS {
520520
}
521521
}
522522

523-
type TryTo = <T>(fn: () => Promise<T> | T) => Promise<T | false>;
524-
type HopeThat = <T>(fn: () => Promise<T> | T) => Promise<T | false>;
525-
type RetryTo = <T>(fn: () => Promise<T> | T, retries?: number) => Promise<T>;
526-
523+
type TryTo = <T>(fn: () => Promise<T> | T) => Promise<T | false>
524+
type HopeThat = <T>(fn: () => Promise<T> | T) => Promise<T | false>
525+
type RetryTo = <T>(fn: () => Promise<T> | T, retries?: number) => Promise<T>
527526

528527
// Globals
529528
declare const codecept_dir: string
530529
declare const output_dir: string
531-
declare const tryTo: TryTo;
532-
declare const retryTo: RetryTo;
533-
declare const hopeThat: HopeThat;
530+
declare const tryTo: TryTo
531+
declare const retryTo: RetryTo
532+
declare const hopeThat: HopeThat
534533

535534
declare const actor: CodeceptJS.actor
536535
declare const codecept_actor: CodeceptJS.actor
@@ -643,7 +642,7 @@ declare module '@codeceptjs/helper' {
643642
}
644643

645644
declare module 'codeceptjs/effects' {
646-
export const tryTo: TryTo;
647-
export const retryTo: RetryTo;
648-
export const hopeThat: HopeThat;
645+
export const tryTo: TryTo
646+
export const retryTo: RetryTo
647+
export const hopeThat: HopeThat
649648
}

0 commit comments

Comments
 (0)