File: 0007-FIx-test-that-fail-due-to-change-in-node-JSON.parse.patch

package info (click to toggle)
node-envinfo 7.11.0%2B~cs14.3.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,288 kB
  • sloc: javascript: 2,763; makefile: 8
file content (150 lines) | stat: -rw-r--r-- 4,217 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
From: =?utf-8?q?Bastien_Roucari=C3=A8s?= <rouca@debian.org>
Date: Wed, 8 Nov 2023 13:13:15 +0000
Subject: FIx test that fail due to change in node JSON.parse

Node json parse output JSON not Object:

forwarded: not-needed
---
 __tests__/__snapshots__/duplicates.test.js.snap    |  8 ++---
 __tests__/__snapshots__/envinfo.test.js.snap       | 40 +++++++++++-----------
 .../__snapshots__/scopedPackages.test.js.snap      | 12 +++----
 3 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/__tests__/__snapshots__/duplicates.test.js.snap b/__tests__/__snapshots__/duplicates.test.js.snap
index 34aafe3..0c11fa3 100644
--- a/__tests__/__snapshots__/duplicates.test.js.snap
+++ b/__tests__/__snapshots__/duplicates.test.js.snap
@@ -1,10 +1,10 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`Running the programmatic interface return expected duplicates in json 1`] = `
-Object {
-  "npmPackages": Object {
-    "b": Object {
-      "duplicates": Array [
+{
+  "npmPackages": {
+    "b": {
+      "duplicates": [
         "1.0.2",
       ],
       "installed": "1.0.0",
diff --git a/__tests__/__snapshots__/envinfo.test.js.snap b/__tests__/__snapshots__/envinfo.test.js.snap
index 4cf4100..0616ff3 100644
--- a/__tests__/__snapshots__/envinfo.test.js.snap
+++ b/__tests__/__snapshots__/envinfo.test.js.snap
@@ -25,9 +25,9 @@ exports[`Running the cli interface returns expected unformatted yaml value 1`] =
 `;
 
 exports[`Running the programmatic interface filters out returned values with N/A 1`] = `
-Object {
-  "Browsers": Object {
-    "Firefox": Object {
+{
+  "Browsers": {
+    "Firefox": {
       "path": "/usr/local/bin/firefox",
       "version": "10.0.0",
     },
@@ -36,9 +36,9 @@ Object {
 `;
 
 exports[`Running the programmatic interface returns expected json value 1`] = `
-Object {
-  "Binaries": Object {
-    "Node": Object {
+{
+  "Binaries": {
+    "Node": {
       "path": "/usr/local/bin/node",
       "version": "10.0.0",
     },
@@ -47,15 +47,15 @@ Object {
 `;
 
 exports[`Running the programmatic interface returns expected json value with multiple categories 1`] = `
-Object {
-  "Binaries": Object {
-    "Node": Object {
+{
+  "Binaries": {
+    "Node": {
       "path": "/usr/local/bin/node",
       "version": "10.0.0",
     },
   },
-  "Languages": Object {
-    "Bash": Object {
+  "Languages": {
+    "Bash": {
       "path": "/usr/local/bin/bash",
       "version": "10.0.0",
     },
@@ -64,17 +64,17 @@ Object {
 `;
 
 exports[`Running the programmatic interface returns expected json value with multiple values 1`] = `
-Object {
-  "Binaries": Object {
-    "Node": Object {
+{
+  "Binaries": {
+    "Node": {
       "path": "/usr/local/bin/node",
       "version": "10.0.0",
     },
-    "Yarn": Object {
+    "Yarn": {
       "path": "/usr/local/bin/yarn",
       "version": "10.0.0",
     },
-    "npm": Object {
+    "npm": {
       "path": "/usr/local/bin/npm",
       "version": "10.0.0",
     },
@@ -90,10 +90,10 @@ exports[`Running the programmatic interface returns expected markdown value 1`]
 `;
 
 exports[`Running the programmatic interface returns expected title in json 1`] = `
-Object {
-  "envinfo rocks!": Object {
-    "Binaries": Object {
-      "Node": Object {
+{
+  "envinfo rocks!": {
+    "Binaries": {
+      "Node": {
         "path": "/usr/local/bin/node",
         "version": "10.0.0",
       },
diff --git a/__tests__/__snapshots__/scopedPackages.test.js.snap b/__tests__/__snapshots__/scopedPackages.test.js.snap
index 547f4cb..b387be3 100644
--- a/__tests__/__snapshots__/scopedPackages.test.js.snap
+++ b/__tests__/__snapshots__/scopedPackages.test.js.snap
@@ -1,18 +1,18 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`envinfo will report on scoped npm packages return expected packages 1`] = `
-Object {
-  "npmPackages": Object {
-    "@scoped-name/test": Object {
+{
+  "npmPackages": {
+    "@scoped-name/test": {
       "installed": "1.0.0",
       "wanted": "1.0.0",
     },
-    "a": Object {
+    "a": {
       "installed": "1.0.0",
       "wanted": "1.0.0",
     },
-    "b": Object {
-      "duplicates": Array [
+    "b": {
+      "duplicates": [
         "1.0.2",
       ],
       "installed": "1.0.0",