testit-adapter-jest 1.1.2 → 1.1.4
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/README.md +173 -198
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -2
- package/dist/debug.d.ts +2 -2
- package/dist/debug.js +8 -8
- package/dist/globalSetup.d.ts +3 -3
- package/dist/globalSetup.js +35 -35
- package/dist/globalTeardown.d.ts +3 -3
- package/dist/globalTeardown.js +16 -16
- package/dist/mappers.d.ts +7 -7
- package/dist/mappers.js +46 -46
- package/dist/testClient.d.ts +18 -18
- package/dist/testClient.js +128 -128
- package/dist/testitEnvironment.d.ts +58 -56
- package/dist/testitEnvironment.js +368 -358
- package/dist/types.d.ts +32 -32
- package/dist/types.js +2 -2
- package/dist/utils.d.ts +13 -13
- package/dist/utils.js +85 -85
- package/package.json +35 -35
package/README.md
CHANGED
|
@@ -1,198 +1,173 @@
|
|
|
1
|
-
# Test IT TMS adapters for Jest
|
|
2
|
-

|
|
3
|
-
|
|
4
|
-
## Getting Started
|
|
5
|
-
|
|
6
|
-
###
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
###
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
###
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
####
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
testit.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
{
|
|
175
|
-
a: 4,
|
|
176
|
-
b: 3,
|
|
177
|
-
sum: 5,
|
|
178
|
-
}
|
|
179
|
-
])('Object params', (params) => {
|
|
180
|
-
testit.params(params);
|
|
181
|
-
expect(params.a + params.b).toBe(params.sum);
|
|
182
|
-
});
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
# Contributing
|
|
187
|
-
|
|
188
|
-
You can help to develop the project. Any contributions are **greatly appreciated**.
|
|
189
|
-
|
|
190
|
-
* If you have suggestions for adding or removing projects, feel free to [open an issue](https://github.com/testit-tms/adapters-js/issues/new) to discuss it, or directly create a pull request after you edit the *README.md* file with necessary changes.
|
|
191
|
-
* Please make sure you check your spelling and grammar.
|
|
192
|
-
* Create individual PR for each suggestion.
|
|
193
|
-
* Please also read through the [Code Of Conduct](https://github.com/testit-tms/adapters-js/blob/master/CODE_OF_CONDUCT.md) before posting your first idea as well.
|
|
194
|
-
|
|
195
|
-
# License
|
|
196
|
-
|
|
197
|
-
Distributed under the Apache-2.0 License. See [LICENSE](https://github.com/testit-tms/adapters-js/blob/master/LICENSE.md) for more information.
|
|
198
|
-
|
|
1
|
+
# Test IT TMS adapters for Jest
|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
## Getting Started
|
|
5
|
+
|
|
6
|
+
### Installation
|
|
7
|
+
```
|
|
8
|
+
npm install testit-adapter-jest
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### API client
|
|
14
|
+
|
|
15
|
+
To use adapter you need to install `testit-api-client`:
|
|
16
|
+
```
|
|
17
|
+
npm install testit-api-client
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Configuration
|
|
21
|
+
|
|
22
|
+
| Description | Property | Environment variable | CLI argument |
|
|
23
|
+
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|-----------------------------------|-------------------------------|
|
|
24
|
+
| Location of the TMS instance | url | TMS_URL | tmsUrl |
|
|
25
|
+
| API secret key [How to getting API secret key?](https://github.com/testit-tms/.github/tree/main/configuration#privatetoken) | privateToken | TMS_PRIVATE_TOKEN | tmsPrivateToken |
|
|
26
|
+
| ID of project in TMS instance [How to getting project ID?](https://github.com/testit-tms/.github/tree/main/configuration#projectid) | projectId | TMS_PROJECT_ID | tmsProjectId |
|
|
27
|
+
| ID of configuration in TMS instance [How to getting configuration ID?](https://github.com/testit-tms/.github/tree/main/configuration#configurationid) | configurationId | TMS_CONFIGURATION_ID | tmsConfigurationId |
|
|
28
|
+
| ID of the created test run in TMS instance.<br/>It's necessary for **adapterMode** 0 or 1 | testRunId | TMS_TEST_RUN_ID | tmsTestRunId |
|
|
29
|
+
| Parameter for specifying the name of test run in TMS instance (**It's optional**). If it is not provided, it is created automatically | testRunName | TMS_TEST_RUN_NAME | tmsTestRunName |
|
|
30
|
+
| Adapter mode. Default value - 0. The adapter supports following modes:<br/>0 - in this mode, the adapter filters tests by test run ID and configuration ID, and sends the results to the test run<br/>1 - in this mode, the adapter sends all results to the test run without filtering<br/>2 - in this mode, the adapter creates a new test run and sends results to the new test run | adapterMode | TMS_ADAPTER_MODE | tmsAdapterMode |
|
|
31
|
+
| It enables/disables certificate validation (**It's optional**). Default value - true | certValidation | TMS_CERT_VALIDATION | tmsCertValidation |
|
|
32
|
+
| Mode of automatic creation test cases (**It's optional**). Default value - false. The adapter supports following modes:<br/>true - in this mode, the adapter will create a test case linked to the created autotest (not to the updated autotest)<br/>false - in this mode, the adapter will not create a test case | automaticCreationTestCases | TMS_AUTOMATIC_CREATION_TEST_CASES | tmsAutomaticCreationTestCases |
|
|
33
|
+
|
|
34
|
+
#### File
|
|
35
|
+
|
|
36
|
+
1. You need to set custom jest test environment, setup and teardown in `jest.config.js`.
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
module.exports = {
|
|
40
|
+
testEnvironment: 'testit-adapter-jest',
|
|
41
|
+
globalSetup: 'testit-adapter-jest/dist/globalSetup.js',
|
|
42
|
+
globalTeardown: 'testit-adapter-jest/dist/globalTeardown.js',
|
|
43
|
+
testEnvironmentOptions: {
|
|
44
|
+
url: 'URL',
|
|
45
|
+
privateToken: 'USER_PRIVATE_TOKEN',
|
|
46
|
+
projectId: 'PROJECT_ID',
|
|
47
|
+
configurationId: 'CONFIGURATION_ID',
|
|
48
|
+
testRunId: 'TEST_RUN_ID',
|
|
49
|
+
adapterMode: ADAPTER_MODE,
|
|
50
|
+
automaticCreationTestCases: AUTOMATIC_CREATION_TEST_CASES
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. You also can extract environment configuration to external config and launch tests with `jest --config ./testit.jest.config.js`.
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
// testit.jest.config.js
|
|
59
|
+
const defaultConfig = require('./jest.config');
|
|
60
|
+
|
|
61
|
+
module.exports = {
|
|
62
|
+
...defaultConfig,
|
|
63
|
+
testEnvironment: 'testit-adapter-jest',
|
|
64
|
+
globalSetup: 'testit-adapter-jest/dist/globalSetup.js',
|
|
65
|
+
globalTeardown: 'testit-adapter-jest/dist/globalTeardown.js',
|
|
66
|
+
testEnvironmentOptions: {
|
|
67
|
+
url: 'URL',
|
|
68
|
+
privateToken: 'USER_PRIVATE_TOKEN',
|
|
69
|
+
projectId: 'PROJECT_ID',
|
|
70
|
+
configurationId: 'CONFIGURATION_ID',
|
|
71
|
+
testRunId: 'TEST_RUN_ID',
|
|
72
|
+
adapterMode: ADAPTER_MODE,
|
|
73
|
+
automaticCreationTestCases: AUTOMATIC_CREATION_TEST_CASES
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
#### Command line
|
|
79
|
+
|
|
80
|
+
You can also specify options via cli arguments `jest --testEnvironment testit-adapter-jest --testEnvironmentOptions "{\"url\":\"URL\",\"privateToken\":\"USER_PRIVATE_TOKEN\",\"projectId\":\"PROJECT_ID\",\"configurationId\":\"CONFIGURATION_ID\",\"testRunId\":\"TEST_RUN_ID\",\"adapterMode\":ADAPTER_MODE,\"automaticCreationTestCases\":AUTOMATIC_CREATION_TEST_CASES}" --globalSetup testit-adapter-jest/dist/globalSetup.js --globalTeardown testit-adapter-jest/dist/globalTeardown.js`
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Methods
|
|
84
|
+
|
|
85
|
+
Methods can be used to specify information about autotest.
|
|
86
|
+
|
|
87
|
+
Description of metadata methods:
|
|
88
|
+
- `testit.workItemIds` - linking an autotest to a test case
|
|
89
|
+
- `testit.displayName` - name of the autotest in the Test IT system (can be replaced with documentation strings)
|
|
90
|
+
- `testit.externalId` - ID of the autotest within the project in the Test IT System
|
|
91
|
+
- `testit.title` - title in the autotest card
|
|
92
|
+
- `testit.description` - description in the autotest card
|
|
93
|
+
- `testit.labels` - tags in the work item
|
|
94
|
+
- `testit.link` - links in the autotest card
|
|
95
|
+
- `testit.nameSpace` - directory in the TMS system (default - directory's name of test)
|
|
96
|
+
- `testit.className` - subdirectory in the TMS system (default - file's name of test)
|
|
97
|
+
|
|
98
|
+
Description of methods:
|
|
99
|
+
- `testit.addLinks` - links in the autotest result
|
|
100
|
+
- `testit.addAttachments` - uploading files in the autotest result
|
|
101
|
+
- `testit.addMessage` - information about autotest in the autotest result
|
|
102
|
+
|
|
103
|
+
### Examples
|
|
104
|
+
|
|
105
|
+
#### Simple test
|
|
106
|
+
```js
|
|
107
|
+
test('All annotations', () => {
|
|
108
|
+
testit.externalId('all_annotations');
|
|
109
|
+
testit.displayName('All annotations');
|
|
110
|
+
testit.title('All annotations title');
|
|
111
|
+
testit.description('Test with all annotations');
|
|
112
|
+
testit.labels(['label1', 'label2']);
|
|
113
|
+
|
|
114
|
+
testit.addMessage('This is a message');
|
|
115
|
+
testit.addLinks([
|
|
116
|
+
{
|
|
117
|
+
url: 'https://www.google.com',
|
|
118
|
+
title: 'Google',
|
|
119
|
+
description: 'This is a link to Google',
|
|
120
|
+
type: 'Related',
|
|
121
|
+
},
|
|
122
|
+
]);
|
|
123
|
+
|
|
124
|
+
testit.addAttachments([join(__dirname, 'attachment1.txt')]);
|
|
125
|
+
testit.addAttachments('This is a custom attachment', 'custom.txt');
|
|
126
|
+
|
|
127
|
+
expect(1).toBe(1);
|
|
128
|
+
});
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
#### Parameterized test
|
|
132
|
+
```js
|
|
133
|
+
test.each([1, 2, 3, 4])('Primitive params', (number) => {
|
|
134
|
+
testit.params(number);
|
|
135
|
+
expect(number).toBe(number);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test.each([
|
|
139
|
+
{
|
|
140
|
+
a: 1,
|
|
141
|
+
b: 2,
|
|
142
|
+
sum: 3,
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
a: 2,
|
|
146
|
+
b: 3,
|
|
147
|
+
sum: 5,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
a: 4,
|
|
151
|
+
b: 3,
|
|
152
|
+
sum: 5,
|
|
153
|
+
}
|
|
154
|
+
])('Object params', (params) => {
|
|
155
|
+
testit.params(params);
|
|
156
|
+
expect(params.a + params.b).toBe(params.sum);
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
# Contributing
|
|
162
|
+
|
|
163
|
+
You can help to develop the project. Any contributions are **greatly appreciated**.
|
|
164
|
+
|
|
165
|
+
* If you have suggestions for adding or removing projects, feel free to [open an issue](https://github.com/testit-tms/adapters-js/issues/new) to discuss it, or directly create a pull request after you edit the *README.md* file with necessary changes.
|
|
166
|
+
* Please make sure you check your spelling and grammar.
|
|
167
|
+
* Create individual PR for each suggestion.
|
|
168
|
+
* Please also read through the [Code Of Conduct](https://github.com/testit-tms/adapters-js/blob/master/CODE_OF_CONDUCT.md) before posting your first idea as well.
|
|
169
|
+
|
|
170
|
+
# License
|
|
171
|
+
|
|
172
|
+
Distributed under the Apache-2.0 License. See [LICENSE](https://github.com/testit-tms/adapters-js/blob/master/LICENSE.md) for more information.
|
|
173
|
+
|
package/dist/config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type AdapterMode = 0 | 1 | 2;
|
|
1
|
+
export type AdapterMode = 0 | 1 | 2;
|
package/dist/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/dist/debug.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import d from 'debug';
|
|
2
|
-
export declare const debug: d.Debugger;
|
|
1
|
+
import d from 'debug';
|
|
2
|
+
export declare const debug: d.Debugger;
|
package/dist/debug.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.debug = void 0;
|
|
7
|
-
const debug_1 = __importDefault(require("debug"));
|
|
8
|
-
exports.debug = (0, debug_1.default)('testit');
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.debug = void 0;
|
|
7
|
+
const debug_1 = __importDefault(require("debug"));
|
|
8
|
+
exports.debug = (0, debug_1.default)('testit');
|
package/dist/globalSetup.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Config } from '@jest/reporters';
|
|
2
|
-
declare const _default: (globalConfig: Config.GlobalConfig, projectConfig: Config.ProjectConfig) => Promise<void>;
|
|
3
|
-
export default _default;
|
|
1
|
+
import { Config } from '@jest/reporters';
|
|
2
|
+
declare const _default: (globalConfig: Config.GlobalConfig, projectConfig: Config.ProjectConfig) => Promise<void>;
|
|
3
|
+
export default _default;
|
package/dist/globalSetup.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const testClient_1 = require("./testClient");
|
|
4
|
-
const utils_1 = require("./utils");
|
|
5
|
-
exports.default = async (globalConfig, projectConfig) => {
|
|
6
|
-
const adapterMode = projectConfig.testEnvironmentOptions?.adapterMode ?? 0;
|
|
7
|
-
const automaticCreationTestCases = projectConfig.testEnvironmentOptions?.automaticCreationTestCases ?? false;
|
|
8
|
-
let testRunId;
|
|
9
|
-
try {
|
|
10
|
-
switch (adapterMode) {
|
|
11
|
-
case 0:
|
|
12
|
-
case 1: {
|
|
13
|
-
testRunId = projectConfig.testEnvironmentOptions?.testRunId;
|
|
14
|
-
if (!testRunId) {
|
|
15
|
-
throw new Error('testRunId is required when mode is 1');
|
|
16
|
-
}
|
|
17
|
-
globalThis.testClient = new testClient_1.TestClient(projectConfig.testEnvironmentOptions);
|
|
18
|
-
break;
|
|
19
|
-
}
|
|
20
|
-
case 2: {
|
|
21
|
-
globalThis.testClient = new testClient_1.TestClient(projectConfig.testEnvironmentOptions);
|
|
22
|
-
testRunId = await globalThis.testClient.createTestRun();
|
|
23
|
-
break;
|
|
24
|
-
}
|
|
25
|
-
default:
|
|
26
|
-
throw new Error(`Unknown adapter mode ${adapterMode}`);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
catch (err) {
|
|
30
|
-
console.error('Failed to setup', (0, utils_1.formatError)(err));
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
33
|
-
projectConfig.globals['testRunId'] = testRunId;
|
|
34
|
-
projectConfig.globals['automaticCreationTestCases'] = automaticCreationTestCases;
|
|
35
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testClient_1 = require("./testClient");
|
|
4
|
+
const utils_1 = require("./utils");
|
|
5
|
+
exports.default = async (globalConfig, projectConfig) => {
|
|
6
|
+
const adapterMode = projectConfig.testEnvironmentOptions?.adapterMode ?? 0;
|
|
7
|
+
const automaticCreationTestCases = projectConfig.testEnvironmentOptions?.automaticCreationTestCases ?? false;
|
|
8
|
+
let testRunId;
|
|
9
|
+
try {
|
|
10
|
+
switch (adapterMode) {
|
|
11
|
+
case 0:
|
|
12
|
+
case 1: {
|
|
13
|
+
testRunId = projectConfig.testEnvironmentOptions?.testRunId;
|
|
14
|
+
if (!testRunId) {
|
|
15
|
+
throw new Error('testRunId is required when mode is 1');
|
|
16
|
+
}
|
|
17
|
+
globalThis.testClient = new testClient_1.TestClient(projectConfig.testEnvironmentOptions);
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
case 2: {
|
|
21
|
+
globalThis.testClient = new testClient_1.TestClient(projectConfig.testEnvironmentOptions);
|
|
22
|
+
testRunId = await globalThis.testClient.createTestRun();
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
default:
|
|
26
|
+
throw new Error(`Unknown adapter mode ${adapterMode}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (err) {
|
|
30
|
+
console.error('Failed to setup', (0, utils_1.formatError)(err));
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
projectConfig.globals['testRunId'] = testRunId;
|
|
34
|
+
projectConfig.globals['automaticCreationTestCases'] = automaticCreationTestCases;
|
|
35
|
+
};
|
package/dist/globalTeardown.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Config } from '@jest/reporters';
|
|
2
|
-
declare const _default: (globalConfig: Config.GlobalConfig, projectConfig: Config.ProjectConfig) => Promise<void>;
|
|
3
|
-
export default _default;
|
|
1
|
+
import { Config } from '@jest/reporters';
|
|
2
|
+
declare const _default: (globalConfig: Config.GlobalConfig, projectConfig: Config.ProjectConfig) => Promise<void>;
|
|
3
|
+
export default _default;
|
package/dist/globalTeardown.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("./utils");
|
|
4
|
-
exports.default = async (globalConfig, projectConfig) => {
|
|
5
|
-
const testRunId = projectConfig.globals['testRunId'];
|
|
6
|
-
if (!testRunId) {
|
|
7
|
-
console.error('Looks like globalSetup was not called');
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
try {
|
|
11
|
-
await globalThis.testClient.completeTestRun();
|
|
12
|
-
}
|
|
13
|
-
catch (err) {
|
|
14
|
-
console.error('Failed to complete test run', (0, utils_1.formatError)(err));
|
|
15
|
-
}
|
|
16
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const utils_1 = require("./utils");
|
|
4
|
+
exports.default = async (globalConfig, projectConfig) => {
|
|
5
|
+
const testRunId = projectConfig.globals['testRunId'];
|
|
6
|
+
if (!testRunId) {
|
|
7
|
+
console.error('Looks like globalSetup was not called');
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
await globalThis.testClient.completeTestRun();
|
|
12
|
+
}
|
|
13
|
+
catch (err) {
|
|
14
|
+
console.error('Failed to complete test run', (0, utils_1.formatError)(err));
|
|
15
|
+
}
|
|
16
|
+
};
|
package/dist/mappers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AttachmentPut, AttachmentPutModelAutotestStepResults, AutotestStep, Parameters } from 'testit-api-client';
|
|
2
|
-
import { StepData } from './types';
|
|
3
|
-
export declare function mapDate(date: number): string;
|
|
4
|
-
export declare function mapStep(step: StepData): AutotestStep;
|
|
5
|
-
export declare function mapParams(params: any): Parameters;
|
|
6
|
-
export declare function mapStepResult(step: StepData): AttachmentPutModelAutotestStepResults;
|
|
7
|
-
export declare function mapAttachments(attachments: string[]): AttachmentPut[];
|
|
1
|
+
import { AttachmentPut, AttachmentPutModelAutotestStepResults, AutotestStep, Parameters } from 'testit-api-client';
|
|
2
|
+
import { StepData } from './types';
|
|
3
|
+
export declare function mapDate(date: number): string;
|
|
4
|
+
export declare function mapStep(step: StepData): AutotestStep;
|
|
5
|
+
export declare function mapParams(params: any): Parameters;
|
|
6
|
+
export declare function mapStepResult(step: StepData): AttachmentPutModelAutotestStepResults;
|
|
7
|
+
export declare function mapAttachments(attachments: string[]): AttachmentPut[];
|