@wdio/browserstack-service 9.39.3 → 9.39.5
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/build/cleanup.js +2 -2
- package/build/cli/modules/automateModule.d.ts +10 -3
- package/build/index.js +78 -11
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export default class AutomateModule extends BaseModule {
|
|
|
5
5
|
logger: typeof BStackLogger;
|
|
6
6
|
browserStackConfig: Options.Testrunner;
|
|
7
7
|
private sessionMap;
|
|
8
|
+
private mochaTestsRan;
|
|
8
9
|
static readonly MODULE_NAME = "AutomateModule";
|
|
9
10
|
/**
|
|
10
11
|
* Create a new AutomateModule
|
|
@@ -25,11 +26,17 @@ export default class AutomateModule extends BaseModule {
|
|
|
25
26
|
* `after()` marked the session failed; that whole accumulation is gated
|
|
26
27
|
* `setSessionStatus && !BrowserstackCLI.isRunning()`, so it is dead while the binary is up.
|
|
27
28
|
*
|
|
28
|
-
* Cucumber
|
|
29
|
-
* legacy mocha behaved the same way, so repairing it here would be an unrequested behaviour
|
|
30
|
-
* change to the one framework already working on the CLI flow.
|
|
29
|
+
* Cucumber only — mocha hooks go through onMochaHookEnd.
|
|
31
30
|
*/
|
|
32
31
|
onBuildLevelHookEnd(hookKey: string, args: Record<string, unknown>): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* A failed mocha hook produces no test result — the tests it aborts are reported skipped,
|
|
34
|
+
* which counts as passed — so the session was marked PASSED even though the run failed.
|
|
35
|
+
* Legacy fails the session on any hook error unless ignoreHooksStatus is set and a test ran;
|
|
36
|
+
* `mochaTestsRan` is only final at teardown, so the verdict is decided in onAfterExecute.
|
|
37
|
+
*/
|
|
38
|
+
onMochaHookEnd(hookKey: string, args: Record<string, unknown>): Promise<void>;
|
|
39
|
+
private isMochaInstance;
|
|
33
40
|
private isCucumberInstance;
|
|
34
41
|
/** The hook's reported name (`BEFORE_ALL for <feature>`), so the session reason names the hook. */
|
|
35
42
|
private resolveHookName;
|