testplane 8.22.1 → 8.22.3

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testplane",
3
- "version": "8.22.1",
3
+ "version": "8.22.3",
4
4
  "description": "Tests framework based on mocha and wdio",
5
5
  "main": "build/src/index.js",
6
6
  "files": [
@@ -1,9 +1,8 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
- /// <reference types="mocha" />
4
3
  import type { BrowserConfig } from "./browser-config";
5
4
  import type { BrowserTestRunEnvOptions } from "../runner/browser-env/vite/types";
6
- import type { Test } from "../types";
5
+ import type { Suite, Test } from "../types";
7
6
  import type { ChildProcessWithoutNullStreams } from "child_process";
8
7
  import { RequestOptions } from "https";
9
8
  export interface CompareOptsConfig {
@@ -126,8 +125,65 @@ export interface ExpectOptsConfig {
126
125
  wait: number;
127
126
  interval: number;
128
127
  }
129
- export interface MochaOpts extends Omit<Mocha.MochaOptions, "ui"> {
130
- ui?: string | ((suite: Mocha.Suite) => void);
128
+ export interface MochaOpts {
129
+ /** Propagate uncaught errors? */
130
+ allowUncaught?: boolean;
131
+ /** Force `done` callback or promise? */
132
+ asyncOnly?: boolean;
133
+ /** bail on the first test failure. */
134
+ bail?: boolean;
135
+ /** Check for global variable leaks? */
136
+ checkLeaks?: boolean;
137
+ /** Color TTY output from reporter */
138
+ color?: boolean;
139
+ /** Delay root suite execution? */
140
+ delay?: boolean;
141
+ /** Show diff on failure? */
142
+ diff?: boolean;
143
+ /** Report tests without running them? */
144
+ dryRun?: boolean;
145
+ /** Test filter given string. */
146
+ fgrep?: string;
147
+ /** Tests marked `only` fail the suite? */
148
+ forbidOnly?: boolean;
149
+ /** Pending tests fail the suite? */
150
+ forbidPending?: boolean;
151
+ /** Full stacktrace upon failure? */
152
+ fullTrace?: boolean;
153
+ /** Variables expected in global scope. */
154
+ globals?: string[];
155
+ /** Test filter given regular expression. */
156
+ grep?: string | RegExp;
157
+ /** Enable desktop notifications? */
158
+ growl?: boolean;
159
+ /** Display inline diffs? */
160
+ inlineDiffs?: boolean;
161
+ /** Invert test filter matches? */
162
+ invert?: boolean;
163
+ /** Disable syntax highlighting? */
164
+ noHighlighting?: boolean;
165
+ /** Reporter name or constructor. */
166
+ reporter?: string;
167
+ /** Reporter settings object. */
168
+ reporterOptions?: unknown;
169
+ /** Number of times to retry failed tests. */
170
+ retries?: number;
171
+ /** Slow threshold value. */
172
+ slow?: number;
173
+ /** Timeout threshold value. */
174
+ timeout?: number | string;
175
+ /** Run jobs in parallel */
176
+ parallel?: boolean;
177
+ /** Max number of worker processes for parallel runs. */
178
+ jobs?: number;
179
+ /** Hooks to bootstrap the root suite with. */
180
+ rootHooks?: unknown;
181
+ /** Pathname of `rootHooks` plugin for parallel runs. */
182
+ require?: string[];
183
+ /** Should be `true` if `Mocha` process is running in a worker process. */
184
+ isWorker?: boolean;
185
+ /** Interface name or path to file with custom interface implementation. */
186
+ ui?: string | Suite;
131
187
  }
132
188
  export interface SystemConfig {
133
189
  debug: boolean;
@@ -250,8 +306,11 @@ export interface SetsConfigParsed {
250
306
  ignoreFiles: Array<string>;
251
307
  browsers: Array<string>;
252
308
  }
253
- export type ConfigInput = Partial<CommonConfig> & {
254
- browsers: Record<string, Partial<CommonConfig> & {
309
+ type PartialCommonConfig = Partial<Omit<CommonConfig, "system">> & {
310
+ system?: Partial<SystemConfig>;
311
+ };
312
+ export type ConfigInput = Partial<PartialCommonConfig> & {
313
+ browsers: Record<string, PartialCommonConfig & {
255
314
  desiredCapabilities: WebdriverIO.Capabilities;
256
315
  }>;
257
316
  plugins?: Record<string, unknown>;
@@ -6,12 +6,13 @@ import { GlobalHelper } from "./types";
6
6
  export { Testplane as default } from "./testplane";
7
7
  export { Key } from "webdriverio";
8
8
  export * from "./mock";
9
- export type { WdioBrowser, TestResult, Test, Suite, TestError, HermioneCtx, GlobalHelper, TestplaneCtx, TestFunctionCtx, } from "./types";
9
+ export type { WdioBrowser, TestResult, Test, Suite, TestError, HermioneCtx, GlobalHelper, TestplaneCtx, TestFunction, TestFunctionCtx, } from "./types";
10
10
  export type { Config } from "./config";
11
11
  export type { ConfigInput, AssertViewOpts } from "./config/types";
12
12
  export type { TestCollection, FormatterTreeSuite, FormatterTreeTest, FormatterTreeMainRunnable, FormatterListTest, } from "./test-collection";
13
13
  export type { StatsResult } from "./stats";
14
14
  import type { TestDefinition, SuiteDefinition, TestHookDefinition } from "./test-reader/test-object/types";
15
+ export type { TestDefinition, SuiteDefinition, TestHookDefinition };
15
16
  declare global {
16
17
  var it: TestDefinition;
17
18
  var describe: SuiteDefinition;
@@ -18,7 +18,7 @@ import { CoordBounds, LooksSameOptions } from "looks-same";
18
18
  export type { Browser as WdioBrowser } from "webdriverio";
19
19
  export type { Test } from "../test-reader/test-object/test";
20
20
  export type { Suite } from "../test-reader/test-object/suite";
21
- export type { TestFunctionCtx } from "../test-reader/test-object/types";
21
+ export type { TestFunction, TestFunctionCtx } from "../test-reader/test-object/types";
22
22
  export interface RootSuite extends Suite {
23
23
  root: true;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testplane",
3
- "version": "8.22.1",
3
+ "version": "8.22.3",
4
4
  "description": "Tests framework based on mocha and wdio",
5
5
  "main": "build/src/index.js",
6
6
  "files": [