@testomatio/reporter 1.6.17-beta.1-tls-fix → 1.6.17

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.
Files changed (52) hide show
  1. package/lib/adapter/webdriver.js +2 -0
  2. package/lib/pipe/testomatio.js +8 -7
  3. package/lib/uploader.js +9 -4
  4. package/package.json +1 -1
  5. package/lib/adapter/codecept.d.ts +0 -2
  6. package/lib/adapter/cucumber/current.d.ts +0 -14
  7. package/lib/adapter/cucumber/legacy.d.ts +0 -0
  8. package/lib/adapter/cucumber.d.ts +0 -2
  9. package/lib/adapter/cypress-plugin/index.d.ts +0 -2
  10. package/lib/adapter/jasmine.d.ts +0 -11
  11. package/lib/adapter/jest.d.ts +0 -13
  12. package/lib/adapter/mocha.d.ts +0 -2
  13. package/lib/adapter/nightwatch.d.ts +0 -4
  14. package/lib/adapter/nightwatch.js +0 -75
  15. package/lib/adapter/playwright.d.ts +0 -14
  16. package/lib/adapter/vitest.d.ts +0 -35
  17. package/lib/adapter/webdriver.d.ts +0 -24
  18. package/lib/bin/cli.d.ts +0 -2
  19. package/lib/bin/reportXml.d.ts +0 -2
  20. package/lib/bin/startTest.d.ts +0 -2
  21. package/lib/bin/uploadArtifacts.d.ts +0 -2
  22. package/lib/client.d.ts +0 -76
  23. package/lib/config.d.ts +0 -1
  24. package/lib/constants.d.ts +0 -25
  25. package/lib/data-storage.d.ts +0 -34
  26. package/lib/junit-adapter/adapter.d.ts +0 -9
  27. package/lib/junit-adapter/csharp.d.ts +0 -5
  28. package/lib/junit-adapter/index.d.ts +0 -3
  29. package/lib/junit-adapter/java.d.ts +0 -5
  30. package/lib/junit-adapter/javascript.d.ts +0 -4
  31. package/lib/junit-adapter/python.d.ts +0 -5
  32. package/lib/junit-adapter/ruby.d.ts +0 -4
  33. package/lib/output.d.ts +0 -11
  34. package/lib/package.json +0 -3
  35. package/lib/pipe/bitbucket.d.ts +0 -23
  36. package/lib/pipe/csv.d.ts +0 -47
  37. package/lib/pipe/debug.d.ts +0 -29
  38. package/lib/pipe/github.d.ts +0 -30
  39. package/lib/pipe/gitlab.d.ts +0 -23
  40. package/lib/pipe/html.d.ts +0 -35
  41. package/lib/pipe/index.d.ts +0 -1
  42. package/lib/pipe/testomatio.d.ts +0 -70
  43. package/lib/reporter-functions.d.ts +0 -34
  44. package/lib/reporter.d.ts +0 -232
  45. package/lib/services/artifacts.d.ts +0 -33
  46. package/lib/services/index.d.ts +0 -9
  47. package/lib/services/key-values.d.ts +0 -27
  48. package/lib/services/logger.d.ts +0 -64
  49. package/lib/uploader.d.ts +0 -60
  50. package/lib/utils/pipe_utils.d.ts +0 -41
  51. package/lib/utils/utils.d.ts +0 -45
  52. package/lib/xmlReader.d.ts +0 -92
@@ -70,6 +70,7 @@ class WebdriverReporter extends WDIOReporter {
70
70
  .map(el => Buffer.from(el.result.value, 'base64'));
71
71
 
72
72
  await this.client.addTestRun(state, {
73
+ rid: test.uid,
73
74
  manuallyAttachedArtifacts: test.artifacts,
74
75
  error,
75
76
  logs: test.logs,
@@ -104,6 +105,7 @@ class WebdriverReporter extends WDIOReporter {
104
105
  const tags = scenario.tags.map(tag => tag.name);
105
106
 
106
107
  return this.client.addTestRun(scenarioState, {
108
+ rid: scenario.uid,
107
109
  error: error ? Error(error) : null,
108
110
  title,
109
111
  test_id: testId,
@@ -3,7 +3,6 @@ const chalk = require('chalk');
3
3
  // Retry interceptor function
4
4
  const axiosRetry = require('axios-retry');
5
5
  // Default axios instance
6
- const https = require('https');
7
6
  const axios = require('axios');
8
7
  const JsonCycle = require('json-cycle');
9
8
 
@@ -58,10 +57,6 @@ class TestomatioPipe {
58
57
  // Create a new instance of axios with a custom config
59
58
  this.axios = axios.create({
60
59
  baseURL: `${this.url.trim()}`,
61
- httpsAgent: new https.Agent({
62
- rejectUnauthorized: true,
63
- keepAlive: false // This is the key setting that forces fresh TLS sessions
64
- }),
65
60
  timeout: AXIOS_TIMEOUT,
66
61
  proxy: proxy ? {
67
62
  host: proxy.hostname,
@@ -353,6 +348,8 @@ class TestomatioPipe {
353
348
  * Adds a test to the batch uploader (or reports a single test if batch uploading is disabled)
354
349
  */
355
350
  addTest(data) {
351
+ this.isEnabled = this.apiKey ?? this.isEnabled;
352
+
356
353
  if (!this.isEnabled) return;
357
354
  if (!this.runId) return;
358
355
 
@@ -361,11 +358,15 @@ class TestomatioPipe {
361
358
  data.api_key = this.apiKey;
362
359
  data.create = this.createNewTests;
363
360
 
364
- if (!this.batch.isEnabled) this.#uploadSingleTest(data);
361
+ let uploading = null;
362
+ if (!this.batch.isEnabled) uploading = this.#uploadSingleTest(data);
365
363
  else this.batch.tests.push(data);
366
364
 
367
365
  // if test is added after run already finished
368
- if (!this.batch.intervalFunction) this.#batchUpload();
366
+ if (!this.batch.intervalFunction) uploading = this.#batchUpload();
367
+
368
+ // return promise to be able to wait for it
369
+ return uploading;
369
370
  }
370
371
 
371
372
  /**
package/lib/uploader.js CHANGED
@@ -128,7 +128,7 @@ class S3Uploader {
128
128
 
129
129
  const link = await this.getS3LocationLink(upload);
130
130
  this.successfulUploads.push({ path: file.path, size: file.size, link });
131
- debug(`📤 Uploaded artifact. File: ${file.path}, size: ${prettyBytes(file.size)}, link: ${link}`);
131
+ debug(`📤 Uploaded artifact. File: ${file.path}, size: ${prettyBytes(file.size || 0)}, link: ${link}`);
132
132
  return link;
133
133
  } catch (e) {
134
134
  this.failedUploads.push({ path: file.path, size: file.size });
@@ -206,7 +206,8 @@ class S3Uploader {
206
206
  * @returns
207
207
  */
208
208
  async uploadFileByPath(filePath, pathInS3) {
209
- // sometimes artifacts uploading started before createRun function completion
209
+ /* WDIO: some artifacts uploading started before createRun function completion
210
+ probably, the reason is that run is NOT created in adapter (but via cli) */
210
211
  this.isEnabled = this.isEnabled ?? this.checkEnabled();
211
212
 
212
213
  const [runId, rid] = pathInS3;
@@ -218,7 +219,7 @@ class S3Uploader {
218
219
 
219
220
  try {
220
221
  // file may not exist
221
- fileSize = fs.statSync(filePath).size;
222
+ fileSize = fs.statSync(filePath).size || 0;
222
223
  fileSizeInMb = Number((fileSize / (1024 * 1024)).toFixed(2));
223
224
  } catch (e) {
224
225
  debug(`File ${filePath} does not exist`);
@@ -277,10 +278,14 @@ class S3Uploader {
277
278
  * @returns
278
279
  */
279
280
  async uploadFileAsBuffer(buffer, pathInS3) {
281
+ /* WDIO: some artifacts uploading started before createRun function completion
282
+ probably, the reason is that run is NOT created in adapter (but via cli) */
283
+
284
+ this.isEnabled = this.isEnabled ?? this.checkEnabled();
280
285
  if (!this.isEnabled) return;
281
286
 
282
287
  let Key = pathInS3.filter(p => !!p).join('/');
283
- const ext = this.#getFileExtBase64(buffer);
288
+ const ext = this.#getFileExtBase64(buffer.toString('base64'));
284
289
 
285
290
  if (ext) {
286
291
  Key = `${Key}.${ext}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "1.6.17-beta.1-tls-fix",
3
+ "version": "1.6.17",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "main": "./lib/reporter.js",
6
6
  "typings": "typings/index.d.ts",
@@ -1,2 +0,0 @@
1
- export default CodeceptReporter;
2
- export function CodeceptReporter(config: any): void;
@@ -1,14 +0,0 @@
1
- export default CucumberReporter;
2
- export class CucumberReporter extends Formatter {
3
- constructor(options: any);
4
- failures: any[];
5
- cases: any[];
6
- client: TestomatClient;
7
- status: string;
8
- parseEnvelope(envelope: any): void;
9
- onTestCaseStarted(testCaseStarted: any): void;
10
- onTestCaseFinished(testCaseFinished: any): void;
11
- onTestRunFinished(envelope: any): void;
12
- }
13
- import { Formatter } from '@cucumber/cucumber';
14
- import TestomatClient from '../../client.js';
File without changes
@@ -1,2 +0,0 @@
1
- export default CucumberReporter;
2
- import { CucumberReporter } from './cucumber/current.js';
@@ -1,2 +0,0 @@
1
- export default testomatioReporter;
2
- declare function testomatioReporter(on: any): void;
@@ -1,11 +0,0 @@
1
- export default JasmineReporter;
2
- export class JasmineReporter {
3
- constructor(options: any);
4
- testTimeMap: {};
5
- client: TestomatClient;
6
- getDuration(test: any): number;
7
- specStarted(result: any): void;
8
- specDone(result: any): void;
9
- jasmineDone(suiteInfo: any, done: any): void;
10
- }
11
- import TestomatClient from '../client.js';
@@ -1,13 +0,0 @@
1
- export class JestReporter {
2
- constructor(globalConfig: any, options: any);
3
- _globalConfig: any;
4
- _options: any;
5
- client: TestomatClient;
6
- onRunStart(): void;
7
- onTestStart(testFile: any): void;
8
- onTestCaseStart(test: any, testCase: any): void;
9
- onTestResult(test: any, testResult: any): void;
10
- onRunComplete(contexts: any, results: any): void;
11
- }
12
- export default JestReporter;
13
- import TestomatClient from '../client.js';
@@ -1,2 +0,0 @@
1
- export default MochaReporter;
2
- declare function MochaReporter(runner: any, opts: any): void;
@@ -1,4 +0,0 @@
1
- declare namespace _default {
2
- function write(results: any, options: any, done: any): Promise<void>;
3
- }
4
- export default _default;
@@ -1,75 +0,0 @@
1
- import TestomatClient from '../client.js';
2
- import { config } from '../config.js';
3
- import { STATUS } from '../constants';
4
- import { getTestomatIdFromTestTitle } from '../utils/utils.js';
5
- const apiKey = config.TESTOMATIO;
6
- const client = new TestomatClient({ apiKey });
7
- export default {
8
- write: async (results, options, done) => {
9
- await client.createRun();
10
- const testFiles = results.modules;
11
- for (const fileName in testFiles) {
12
- // in nightwatch: object containing tests from a single file
13
- const testModule = testFiles[fileName];
14
- // passed and failed tests (tests with assertions)
15
- const completedTests = testModule.completed;
16
- // skipped tests (skipped by user or tests without assertions)
17
- const skippedTests = testModule.skipped;
18
- const tags = testModule.tags || [];
19
- // if test file contains multiple suites, the last suite name is used as a name 🤷‍♂️
20
- // no other places which contain suite name (even inside test object)
21
- const suiteTitle = testModule.name;
22
- for (const testTitle in completedTests) {
23
- const test = completedTests[testTitle];
24
- let status;
25
- switch (test.status) {
26
- case 'pass':
27
- status = STATUS.PASSED;
28
- break;
29
- case 'fail':
30
- status = STATUS.FAILED;
31
- break;
32
- // probably not required (because skipped tests are in separate array), but just in case
33
- case 'skip':
34
- status = STATUS.SKIPPED;
35
- console.info('Skipped test is in completed tests array:', test, 'Not expected behavior.');
36
- break;
37
- default:
38
- console.error('Test status processing error:', test.status);
39
- }
40
- const testId = getTestomatIdFromTestTitle(testTitle);
41
- client.addTestRun(status, {
42
- error: { name: test.assertions?.[0]?.name, message: test.assertions?.[0]?.message, stack: test.stackTrace },
43
- file: testModule.modulePath?.replace(process.cwd(), ''),
44
- message: test.assertions?.[0]?.message,
45
- rid: `${testModule.uuid || ''}_${testTitle || ''}`,
46
- stack: test.stackTrace,
47
- suite_title: suiteTitle,
48
- tags,
49
- test_id: testId,
50
- time: test.timeMs,
51
- title: testTitle,
52
- });
53
- }
54
- // just array with skipped tests titles, no any other info
55
- for (const testTitle of skippedTests) {
56
- client.addTestRun(STATUS.SKIPPED, {
57
- suite_title: suiteTitle,
58
- tags,
59
- rid: `${testModule.uuid || ''}_${testTitle || ''}`,
60
- title: testTitle,
61
- });
62
- }
63
- }
64
- /**
65
- * @type {'passed' | 'failed' | 'finished'}
66
- */
67
- let runStatus = 'finished';
68
- if (results.failed)
69
- runStatus = 'failed';
70
- else if (results.passed)
71
- runStatus = 'passed';
72
- await client.updateRunStatus(runStatus);
73
- done();
74
- },
75
- };
@@ -1,14 +0,0 @@
1
- export default PlaywrightReporter;
2
- declare class PlaywrightReporter {
3
- constructor(config?: {});
4
- client: TestomatioClient;
5
- uploads: any[];
6
- onBegin(config: any, suite: any): void;
7
- suite: any;
8
- config: any;
9
- onTestBegin(testInfo: any): void;
10
- onTestEnd(test: any, result: any): void;
11
- onEnd(result: any): Promise<void>;
12
- #private;
13
- }
14
- import TestomatioClient from '../client.js';
@@ -1,35 +0,0 @@
1
- export default VitestReporter;
2
- export type VitestTest = any;
3
- export type VitestTestFile = any;
4
- export type VitestSuite = any;
5
- export type VitestTestLogs = any;
6
- export type ErrorWithDiff = import("../../types/vitest.types.js").ErrorWithDiff;
7
- export type STATUS = typeof import("../constants.js").STATUS;
8
- export type TestData = import("../../types/types.js").TestData;
9
- /**
10
- * @typedef {import('../../types/types.js').VitestTest} VitestTest
11
- * @typedef {import('../../types/types.js').VitestTestFile} VitestTestFile
12
- * @typedef {import('../../types/types.js').VitestSuite} VitestSuite
13
- * @typedef {import('../../types/types.js').VitestTestLogs} VitestTestLogs
14
- * @typedef {import('../../types/vitest.types.js').ErrorWithDiff} ErrorWithDiff
15
- * @typedef {typeof import('../constants.js').STATUS} STATUS
16
- * @typedef {import('../../types/types.js').TestData} TestData
17
- */
18
- export class VitestReporter {
19
- constructor(config?: {});
20
- client: TestomatioClient;
21
- /**
22
- * @type {(TestData & {status: string})[]} tests
23
- */
24
- tests: (TestData & {
25
- status: string;
26
- })[];
27
- onInit(): void;
28
- /**
29
- * @param {VitestTestFile[] | undefined} files // array with results;
30
- * @param {unknown[] | undefined} errors // errors does not contain errors from tests; probably its testrunner errors
31
- */
32
- onFinished(files: VitestTestFile[] | undefined, errors: unknown[] | undefined): Promise<void>;
33
- #private;
34
- }
35
- import { Client as TestomatioClient } from '../client.js';
@@ -1,24 +0,0 @@
1
- export default WebdriverReporter;
2
- declare class WebdriverReporter extends WDIOReporter {
3
- constructor(options: any);
4
- client: TestomatClient;
5
- _addTestPromises: any[];
6
- _isSynchronising: boolean;
7
- /**
8
- *
9
- * @param {RunnerStats} runData
10
- */
11
- onRunnerEnd(runData: RunnerStats): Promise<void>;
12
- onRunnerStart(): void;
13
- onTestStart(test: any): void;
14
- onTestEnd(test: any): void;
15
- onSuiteEnd(scerario: any): void;
16
- addTest(test: any): Promise<void>;
17
- /**
18
- * @param {import('../../types/types.js').WebdriverIOScenario} scenario
19
- */
20
- addBddScenario(scenario: import("../../types/types.js").WebdriverIOScenario): Promise<import("../../types/types.js").PipeResult[]>;
21
- }
22
- import WDIOReporter from '@wdio/reporter';
23
- import TestomatClient from '../client.js';
24
- import { RunnerStats } from '@wdio/reporter';
package/lib/bin/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/lib/client.d.ts DELETED
@@ -1,76 +0,0 @@
1
- export default Client;
2
- export type TestData = import("../types/types.js").TestData;
3
- export type PipeResult = import("../types/types.js").PipeResult;
4
- /**
5
- * @typedef {import('../types/types.js').TestData} TestData
6
- * @typedef {import('../types/types.js').PipeResult} PipeResult
7
- */
8
- export class Client {
9
- /**
10
- * Create a Testomat client instance
11
- * @returns
12
- */
13
- constructor(params?: {});
14
- paramsForPipesFactory: {};
15
- pipeStore: {};
16
- runId: `${string}-${string}-${string}-${string}-${string}`;
17
- queue: Promise<void>;
18
- version: any;
19
- executionList: Promise<void>;
20
- uploader: S3Uploader;
21
- /**
22
- * Asynchronously prepares the execution list for running tests through various pipes.
23
- * Each pipe in the client is checked for enablement,
24
- * and if all pipes are disabled, the function returns a resolved Promise.
25
- * Otherwise, it executes the `prepareRun` method for each enabled pipe and collects the results.
26
- * The results are then filtered to remove any undefined values.
27
- * If no valid results are found, the function returns undefined.
28
- * Otherwise, it returns the first non-empty array from the filtered results.
29
- *
30
- * @param {Object} params - The options for preparing the test execution list.
31
- * @param {string} params.pipe - Name of the executed pipe.
32
- * @param {string} params.pipeOptions - Filter option.
33
- * @returns {Promise<any>} - A Promise that resolves to an
34
- * array containing the prepared execution list,
35
- * or resolves to undefined if no valid results are found or if all pipes are disabled.
36
- */
37
- prepareRun(params: {
38
- pipe: string;
39
- pipeOptions: string;
40
- }): Promise<any>;
41
- pipes: any[];
42
- /**
43
- * Used to create a new Test run
44
- *
45
- * @returns {Promise<any>} - resolves to Run id which should be used to update / add test
46
- */
47
- createRun(params: any): Promise<any>;
48
- /**
49
- * Updates test status and its data
50
- *
51
- * @param {string|undefined} status
52
- * @param {TestData} [testData]
53
- * @returns {Promise<PipeResult[]>}
54
- */
55
- addTestRun(status: string | undefined, testData?: TestData): Promise<PipeResult[]>;
56
- /**
57
- *
58
- * Updates the status of the current test run and finishes the run.
59
- * @param {'passed' | 'failed' | 'skipped' | 'finished'} status - The status of the current test run.
60
- * Must be one of "passed", "failed", or "finished"
61
- * @param {boolean} [isParallel] - Whether the current test run was executed in parallel with other tests.
62
- * @returns {Promise<any>} - A Promise that resolves when finishes the run.
63
- */
64
- updateRunStatus(status: "passed" | "failed" | "skipped" | "finished", isParallel?: boolean): Promise<any>;
65
- /**
66
- * Returns the formatted stack including the stack trace, steps, and logs.
67
- * @returns {string}
68
- */
69
- formatLogs({ error, steps, logs }: {
70
- error: any;
71
- steps: any;
72
- logs: any;
73
- }): string;
74
- formatError(error: any, message: any): string;
75
- }
76
- import { S3Uploader } from './uploader.js';
package/lib/config.d.ts DELETED
@@ -1 +0,0 @@
1
- export const config: NodeJS.ProcessEnv;
@@ -1,25 +0,0 @@
1
- export const APP_PREFIX: string;
2
- export const TESTOMAT_TMP_STORAGE_DIR: string;
3
- export const CSV_HEADERS: {
4
- id: string;
5
- title: string;
6
- }[];
7
- export namespace STATUS {
8
- let PASSED: string;
9
- let FAILED: string;
10
- let SKIPPED: string;
11
- let FINISHED: string;
12
- }
13
- export namespace HTML_REPORT {
14
- let FOLDER: string;
15
- let REPORT_DEFAULT_NAME: string;
16
- let TEMPLATE_NAME: string;
17
- }
18
- export const AXIOS_TIMEOUT: number;
19
- export const testomatLogoURL: "https://avatars.githubusercontent.com/u/59105116?s=36&v=4";
20
- export namespace REPORTER_REQUEST_RETRIES {
21
- let retryTimeout: number;
22
- let retriesPerRequest: number;
23
- let maxTotalRetries: number;
24
- let withinTimeSeconds: number;
25
- }
@@ -1,34 +0,0 @@
1
- export const dataStorage: DataStorage;
2
- declare class DataStorage {
3
- static "__#11@#instance": any;
4
- /**
5
- *
6
- * @returns {DataStorage}
7
- */
8
- static getInstance(): DataStorage;
9
- context: any;
10
- setContext(context: any): void;
11
- isFileStorage: boolean;
12
- /**
13
- * Puts any data to storage (file or global variable).
14
- * If file: stores data as text, if global variable – stores as array of data.
15
- * @param {'log' | 'artifact' | 'keyvalue'} dataType
16
- * @param {*} data anything you want to store (string, object, array, etc)
17
- * @param {*} context could be testId or any context (test name, suite name, including their IDs etc)
18
- * suite name + test name is used by default
19
- * @returns
20
- */
21
- putData(dataType: "log" | "artifact" | "keyvalue", data: any, context?: any): void;
22
- /**
23
- * Returns data, stored for specific test/context (or data which was stored without test id specified).
24
- * This method will get data from global variable and/or from from file (previosly saved with put method).
25
- *
26
- * @param {'log' | 'artifact' | 'keyvalue'} dataType
27
- * @param {string} context
28
- * @returns {any []} array of data (any type), null (if no data found for context) or string (if data type is log)
29
- */
30
- getData(dataType: "log" | "artifact" | "keyvalue", context: string): any[];
31
- #private;
32
- }
33
- export function stringToMD5Hash(str: any): string;
34
- export {};
@@ -1,9 +0,0 @@
1
- export default Adapter;
2
- declare class Adapter {
3
- constructor(opts: any);
4
- opts: any;
5
- getFilePath(t: any): any;
6
- formatTest(t: any): any;
7
- formatStack(t: any): any;
8
- formatMessage(t: any): any;
9
- }
@@ -1,5 +0,0 @@
1
- export default CSharpAdapter;
2
- declare class CSharpAdapter extends Adapter {
3
- getFilePath(t: any): string;
4
- }
5
- import Adapter from './adapter.js';
@@ -1,3 +0,0 @@
1
- export default AdapterFactory;
2
- declare function AdapterFactory(lang: any, opts: any): Adapter;
3
- import Adapter from './adapter.js';
@@ -1,5 +0,0 @@
1
- export default JavaAdapter;
2
- declare class JavaAdapter extends Adapter {
3
- getFilePath(t: any): string;
4
- }
5
- import Adapter from './adapter.js';
@@ -1,4 +0,0 @@
1
- export default JavaScriptAdapter;
2
- declare class JavaScriptAdapter extends Adapter {
3
- }
4
- import Adapter from './adapter.js';
@@ -1,5 +0,0 @@
1
- export default PythonAdapter;
2
- declare class PythonAdapter extends Adapter {
3
- getFilePath(t: any): string;
4
- }
5
- import Adapter from './adapter.js';
@@ -1,4 +0,0 @@
1
- export default RubyAdapter;
2
- declare class RubyAdapter extends Adapter {
3
- }
4
- import Adapter from './adapter.js';
package/lib/output.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export default Output;
2
- declare class Output {
3
- constructor(opts?: {});
4
- filterFn: any;
5
- reset(): void;
6
- log: any[];
7
- start(): void;
8
- push(line: any): void;
9
- text(): string;
10
- stop(): void;
11
- }
package/lib/package.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1,23 +0,0 @@
1
- /**
2
- * @class BitbucketPipe
3
- * @typedef {import('../../types/types.js').Pipe} Pipe
4
- * @typedef {import('../../types/types.js').TestData} TestData
5
- */
6
- export class BitbucketPipe {
7
- constructor(params: any, store?: {});
8
- isEnabled: boolean;
9
- ENV: NodeJS.ProcessEnv;
10
- store: {};
11
- tests: any[];
12
- token: any;
13
- hiddenCommentData: string;
14
- cleanLog(log: any): Promise<string>;
15
- prepareRun(): Promise<void>;
16
- createRun(): Promise<void>;
17
- addTest(test: any): void;
18
- finishRun(runParams: any): Promise<void>;
19
- toString(): string;
20
- updateRun(): void;
21
- }
22
- export type Pipe = import("../../types/types.js").Pipe;
23
- export type TestData = import("../../types/types.js").TestData;
package/lib/pipe/csv.d.ts DELETED
@@ -1,47 +0,0 @@
1
- export default CsvPipe;
2
- export type Pipe = import("../../types/types.js").Pipe;
3
- export type TestData = import("../../types/types.js").TestData;
4
- /**
5
- * @typedef {import('../../types/types.js').Pipe} Pipe
6
- * @typedef {import('../../types/types.js').TestData} TestData
7
- * @class CsvPipe
8
- * @implements {Pipe}
9
- */
10
- declare class CsvPipe implements Pipe {
11
- constructor(params: any, store: any);
12
- store: any;
13
- title: any;
14
- results: any[];
15
- outputDir: string;
16
- defaultReportName: string;
17
- csvFilename: string;
18
- isEnabled: boolean;
19
- outputFile: string;
20
- prepareRun(): Promise<void>;
21
- createRun(): Promise<void>;
22
- updateRun(): void;
23
- /**
24
- * Create a folder that will contain the exported files
25
- */
26
- checkExportDir(): void;
27
- /**
28
- * Save data to the csv file.
29
- * @param {Object} data - data that will be added to the CSV file.
30
- * Example: [{suite_title: "Suite #1", test: "Test-case-1", message: "Test msg"}]
31
- * @param {Object} headers - csv file headers. Example: [{ id: 'suite_title', title: 'Suite_title' }]
32
- */
33
- saveToCsv(data: any, headers: any): Promise<void>;
34
- /**
35
- * Add test data to the result array for saving. As a result of this function, we get a result object to save.
36
- * @param {Object} test - object which includes each test entry.
37
- */
38
- addTest(test: any): void;
39
- /**
40
- * @param {{ tests?: TestData[] }} runParams
41
- * @returns {Promise<void>}
42
- */
43
- finishRun(runParams: {
44
- tests?: TestData[];
45
- }): Promise<void>;
46
- toString(): string;
47
- }