@teamkeel/testing-runtime 0.370.0 → 0.370.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Executor.mjs +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamkeel/testing-runtime",
3
- "version": "0.370.0",
3
+ "version": "0.370.1",
4
4
  "description": "Internal package used by the generated @teamkeel/testing package",
5
5
  "exports": "./src/index.mjs",
6
6
  "typings": "src/index.d.ts",
package/src/Executor.mjs CHANGED
@@ -102,8 +102,19 @@ export class Executor {
102
102
  }
103
103
 
104
104
  if (this._parseJsonResult) {
105
- return r.json();
105
+ return r.text().then((t) => {
106
+ return JSON.parse(t, reviver);
107
+ });
106
108
  }
107
109
  });
108
110
  }
109
111
  }
112
+
113
+ const dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:(\d{2}(?:\.\d*))Z$/;
114
+
115
+ function reviver(key, value) {
116
+ if (typeof value === "string" && dateFormat.test(value)) {
117
+ return new Date(value);
118
+ }
119
+ return value;
120
+ }