allure-cucumberjs 3.7.2 → 3.8.0
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 +14 -0
- package/dist/cjs/runtime.js +5 -1
- package/dist/cjs/runtime.js.map +1 -1
- package/dist/esm/runtime.js +5 -1
- package/dist/esm/runtime.js.map +1 -1
- package/dist/types/runtime.d.ts +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -128,3 +128,17 @@ When("they sign in with a valid password", async function () {
|
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
More details about the API are available at [https://allurereport.org/docs/cucumberjs-reference/](https://allurereport.org/docs/cucumberjs-reference/).
|
|
131
|
+
|
|
132
|
+
### Sync API
|
|
133
|
+
|
|
134
|
+
When your step definitions use synchronous helpers or matcher integrations, you can use the sync facade from `allure-js-commons/sync`.
|
|
135
|
+
|
|
136
|
+
```js
|
|
137
|
+
import * as allure from "allure-js-commons/sync";
|
|
138
|
+
|
|
139
|
+
allure.step("check result", () => {
|
|
140
|
+
allure.parameter("mode", "sync");
|
|
141
|
+
});
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The sync facade is strict-sync only: `allure.step()` must finish synchronously and must not return a `Promise`.
|
package/dist/cjs/runtime.js
CHANGED
|
@@ -10,9 +10,13 @@ var _runtime = require("allure-js-commons/sdk/runtime");
|
|
|
10
10
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
11
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
12
|
class AllureCucumberTestRuntime extends _runtime.MessageTestRuntime {
|
|
13
|
+
sendMessageSync(message) {
|
|
14
|
+
_cucumber.world.attach(JSON.stringify(message), _reporter.ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE);
|
|
15
|
+
}
|
|
13
16
|
sendMessage(message) {
|
|
17
|
+
var _this = this;
|
|
14
18
|
return _asyncToGenerator(function* () {
|
|
15
|
-
|
|
19
|
+
_this.sendMessageSync(message);
|
|
16
20
|
yield Promise.resolve();
|
|
17
21
|
})();
|
|
18
22
|
}
|
package/dist/cjs/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["_cucumber","require","_reporter","_runtime","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","AllureCucumberTestRuntime","MessageTestRuntime","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["_cucumber","require","_reporter","_runtime","asyncGeneratorStep","n","t","e","r","o","a","c","i","u","value","done","Promise","resolve","then","_asyncToGenerator","arguments","apply","_next","_throw","AllureCucumberTestRuntime","MessageTestRuntime","sendMessageSync","message","world","attach","JSON","stringify","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE","sendMessage","_this","exports"],"sources":["../../src/runtime.ts"],"sourcesContent":["import { world } from \"@cucumber/cucumber\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"allure-js-commons/sdk/reporter\";\nimport { MessageTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nexport class AllureCucumberTestRuntime extends MessageTestRuntime {\n sendMessageSync(message: RuntimeMessage) {\n world.attach(JSON.stringify(message), ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE as string);\n }\n\n async sendMessage(message: RuntimeMessage) {\n this.sendMessageSync(message);\n await Promise.resolve();\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GA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ime.js
CHANGED
|
@@ -4,9 +4,13 @@ import { world } from "@cucumber/cucumber";
|
|
|
4
4
|
import { ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from "allure-js-commons/sdk/reporter";
|
|
5
5
|
import { MessageTestRuntime } from "allure-js-commons/sdk/runtime";
|
|
6
6
|
export class AllureCucumberTestRuntime extends MessageTestRuntime {
|
|
7
|
+
sendMessageSync(message) {
|
|
8
|
+
world.attach(JSON.stringify(message), ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE);
|
|
9
|
+
}
|
|
7
10
|
sendMessage(message) {
|
|
11
|
+
var _this = this;
|
|
8
12
|
return _asyncToGenerator(function* () {
|
|
9
|
-
|
|
13
|
+
_this.sendMessageSync(message);
|
|
10
14
|
yield Promise.resolve();
|
|
11
15
|
})();
|
|
12
16
|
}
|
package/dist/esm/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["world","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE","MessageTestRuntime","AllureCucumberTestRuntime","
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["world","ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE","MessageTestRuntime","AllureCucumberTestRuntime","sendMessageSync","message","attach","JSON","stringify","sendMessage","_this","_asyncToGenerator","Promise","resolve"],"sources":["../../src/runtime.ts"],"sourcesContent":["import { world } from \"@cucumber/cucumber\";\nimport type { RuntimeMessage } from \"allure-js-commons/sdk\";\nimport { ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE } from \"allure-js-commons/sdk/reporter\";\nimport { MessageTestRuntime } from \"allure-js-commons/sdk/runtime\";\n\nexport class AllureCucumberTestRuntime extends MessageTestRuntime {\n sendMessageSync(message: RuntimeMessage) {\n world.attach(JSON.stringify(message), ALLURE_RUNTIME_MESSAGE_CONTENT_TYPE as string);\n }\n\n async sendMessage(message: RuntimeMessage) {\n this.sendMessageSync(message);\n await Promise.resolve();\n }\n}\n"],"mappings":";;AAAA,SAASA,KAAK,QAAQ,oBAAoB;AAE1C,SAASC,mCAAmC,QAAQ,gCAAgC;AACpF,SAASC,kBAAkB,QAAQ,+BAA+B;AAElE,OAAO,MAAMC,yBAAyB,SAASD,kBAAkB,CAAC;EAChEE,eAAeA,CAACC,OAAuB,EAAE;IACvCL,KAAK,CAACM,MAAM,CAACC,IAAI,CAACC,SAAS,CAACH,OAAO,CAAC,EAAEJ,mCAA6C,CAAC;EACtF;EAEMQ,WAAWA,CAACJ,OAAuB,EAAE;IAAA,IAAAK,KAAA;IAAA,OAAAC,iBAAA;MACzCD,KAAI,CAACN,eAAe,CAACC,OAAO,CAAC;MAC7B,MAAMO,OAAO,CAACC,OAAO,CAAC,CAAC;IAAC;EAC1B;AACF","ignoreList":[]}
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RuntimeMessage } from "allure-js-commons/sdk";
|
|
2
2
|
import { MessageTestRuntime } from "allure-js-commons/sdk/runtime";
|
|
3
3
|
export declare class AllureCucumberTestRuntime extends MessageTestRuntime {
|
|
4
|
+
sendMessageSync(message: RuntimeMessage): void;
|
|
4
5
|
sendMessage(message: RuntimeMessage): Promise<void>;
|
|
5
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "allure-cucumberjs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "Allure Cucumber.JS integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allure",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"test": "vitest run"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"allure-js-commons": "3.
|
|
60
|
+
"allure-js-commons": "3.8.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@babel/cli": "^7.28.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@types/babel__preset-env": "^7.10.0",
|
|
72
72
|
"@types/node": "^20.19.0",
|
|
73
73
|
"allure-commandline": "^2.29.0",
|
|
74
|
-
"allure-vitest": "3.
|
|
74
|
+
"allure-vitest": "3.8.0",
|
|
75
75
|
"babel-plugin-add-module-exports": "^1.0.4",
|
|
76
76
|
"npm-run-all2": "^8.0.0",
|
|
77
77
|
"rimraf": "^6.0.0",
|