@teamkeel/testing-runtime 0.396.8-next.2 → 0.397.0-next.1
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/package.json +1 -1
- package/src/Executor.mjs +10 -0
package/package.json
CHANGED
package/src/Executor.mjs
CHANGED
|
@@ -5,6 +5,7 @@ export class Executor {
|
|
|
5
5
|
constructor(props) {
|
|
6
6
|
this._identity = props.identity || null;
|
|
7
7
|
this._authToken = props.authToken || null;
|
|
8
|
+
this._timezone = props.timezone || null;
|
|
8
9
|
this._apiBaseUrl = props.apiBaseUrl;
|
|
9
10
|
this._parseJsonResult = props.parseJsonResult;
|
|
10
11
|
|
|
@@ -37,6 +38,10 @@ export class Executor {
|
|
|
37
38
|
parseJsonResult: this._parseJsonResult,
|
|
38
39
|
});
|
|
39
40
|
}
|
|
41
|
+
withTimezone(t) {
|
|
42
|
+
this._timezone = t;
|
|
43
|
+
return this;
|
|
44
|
+
}
|
|
40
45
|
_execute(method, params) {
|
|
41
46
|
const headers = { "Content-Type": "application/json" };
|
|
42
47
|
|
|
@@ -64,6 +69,11 @@ export class Executor {
|
|
|
64
69
|
headers["Authorization"] = "Bearer " + this._authToken;
|
|
65
70
|
}
|
|
66
71
|
|
|
72
|
+
// If a timezone is set, it should be sent in the headers
|
|
73
|
+
if (this._timezone !== null) {
|
|
74
|
+
headers["Time-Zone"] = this._timezone;
|
|
75
|
+
}
|
|
76
|
+
|
|
67
77
|
if (params?.scheduled) {
|
|
68
78
|
headers["X-Trigger-Type"] = "scheduled";
|
|
69
79
|
} else {
|