@jsenv/core 23.4.0 → 23.4.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "23.4.0",
3
+ "version": "23.4.1",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "repository": {
package/readme.md CHANGED
@@ -99,16 +99,16 @@ executeTestPlan({
99
99
  ✔ execution 1 of 2 completed (all completed)
100
100
  file: animals.test.html
101
101
  runtime: chromium/82.0.4057.0
102
- duration: 1.28 seconds
102
+ duration: 1.2 seconds
103
103
 
104
104
  ✔ execution 2 of 2 completed (all completed)
105
105
  file: animals.test.html
106
106
  runtime: firefox/73.0b13
107
- duration: 2.42 seconds
107
+ duration: 2.4 seconds
108
108
 
109
109
  -------------- summary -----------------
110
110
  2 executions: all completed
111
- total duration: 3.72 seconds
111
+ total duration: 3.6 seconds
112
112
  ----------------------------------------
113
113
  ```
114
114
 
@@ -27,9 +27,14 @@ export const visitNodeV8Directory = async ({
27
27
 
28
28
  const dirEntryUrl = resolveUrl(dirEntry, coverageDirectoryUrl)
29
29
  const tryReadJsonFile = async () => {
30
+ const fileContent = await readFile(dirEntryUrl, { as: "string" })
31
+ if (fileContent === "") {
32
+ return null
33
+ }
34
+
30
35
  try {
31
- const fileContent = await readFile(dirEntryUrl, { as: "json" })
32
- return fileContent
36
+ const fileAsJson = JSON.parse(fileContent)
37
+ return fileAsJson
33
38
  } catch (e) {
34
39
  console.warn(
35
40
  createDetailedMessage(`Error while reading coverage file`, {