k6-cucumber-steps 1.0.14 → 1.0.16

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/index.js ADDED
@@ -0,0 +1,6 @@
1
+ // Export all exports from your helper files
2
+ export * from "./lib/helpers/buildK6Script";
3
+ export * from "./lib/helpers/generateHeaders";
4
+ export * from "./lib/helpers/resolveBody";
5
+ export * from "./lib/utils/k6Runner";
6
+ export * from "./step_definitions/load_test_steps.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "k6-cucumber-steps",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -0,0 +1,89 @@
1
+ import { DataTable } from "@cucumber/cucumber";
2
+
3
+ declare module "@cucumber/cucumber" {
4
+ interface World {
5
+ config: {
6
+ method?: string;
7
+ options?: any;
8
+ headers?: Record<string, string>;
9
+ endpoints?: string[];
10
+ body?: any;
11
+ endpoint?: string;
12
+ };
13
+ }
14
+ }
15
+
16
+ export function Given(
17
+ pattern: string,
18
+ fn: (
19
+ this: import("@cucumber/cucumber").World,
20
+ ...args: any[]
21
+ ) => Promise<any> | void
22
+ ): void;
23
+ export function When(
24
+ pattern: string,
25
+ fn: (
26
+ this: import("@cucumber/cucumber").World,
27
+ ...args: any[]
28
+ ) => Promise<any> | void
29
+ ): void;
30
+ export function Then(
31
+ pattern: string,
32
+ fn: (
33
+ this: import("@cucumber/cucumber").World,
34
+ ...args: any[]
35
+ ) => Promise<any> | void
36
+ ): void;
37
+
38
+ declare function Given(
39
+ pattern: "I have a k6 script for {word} testing",
40
+ implementation: (
41
+ this: import("@cucumber/cucumber").World,
42
+ method: string
43
+ ) => void
44
+ ): void;
45
+ declare function When(
46
+ pattern: "I run the k6 script with the following configurations:",
47
+ implementation: (
48
+ this: import("@cucumber/cucumber").World,
49
+ dataTable: DataTable
50
+ ) => void
51
+ ): void;
52
+ declare function When(
53
+ pattern: "the request headers are:",
54
+ implementation: (
55
+ this: import("@cucumber/cucumber").World,
56
+ dataTable: DataTable
57
+ ) => void
58
+ ): void;
59
+ declare function When(
60
+ pattern: "the following endpoint\\(s) is\\/are used:",
61
+ implementation: (
62
+ this: import("@cucumber/cucumber").World,
63
+ docString: string
64
+ ) => void
65
+ ): void;
66
+ declare function When(
67
+ pattern: "the following {word} body is used for {string}",
68
+ implementation: (
69
+ this: import("@cucumber/cucumber").World,
70
+ method: string,
71
+ endpoint: string,
72
+ docString: string
73
+ ) => void
74
+ ): void;
75
+ declare function When(
76
+ pattern: "the authentication type is {string}",
77
+ implementation: (
78
+ this: import("@cucumber/cucumber").World,
79
+ authType: string
80
+ ) => void
81
+ ): void;
82
+ declare function Then(
83
+ pattern: "the API should handle the {word} request successfully",
84
+ implementation: (
85
+ this: import("@cucumber/cucumber").World,
86
+ method: string,
87
+ options?: { timeout?: number }
88
+ ) => Promise<void>
89
+ ): void;
package/lib/index.js DELETED
@@ -1,5 +0,0 @@
1
- // Export all exports from your helper files
2
- export * from "../lib/helpers/buildK6Script";
3
- export * from "../lib/helpers/generateHeaders";
4
- export * from "../lib/helpers/resolveBody";
5
- export * from "../lib/utils/k6Runner";