|  | 
|  | 1 | +# Snapshot report for `test/prefer-response-static-json.js` | 
|  | 2 | + | 
|  | 3 | +The actual snapshot is saved in `prefer-response-static-json.js.snap`. | 
|  | 4 | + | 
|  | 5 | +Generated by [AVA](https://avajs.dev). | 
|  | 6 | + | 
|  | 7 | +## invalid(1): new Response(JSON.stringify(data)) | 
|  | 8 | + | 
|  | 9 | +> Input | 
|  | 10 | +
 | 
|  | 11 | +    `␊ | 
|  | 12 | +      1 | new Response(JSON.stringify(data))␊ | 
|  | 13 | +    ` | 
|  | 14 | + | 
|  | 15 | +> Output | 
|  | 16 | +
 | 
|  | 17 | +    `␊ | 
|  | 18 | +      1 | Response.json(data)␊ | 
|  | 19 | +    ` | 
|  | 20 | + | 
|  | 21 | +> Error 1/1 | 
|  | 22 | +
 | 
|  | 23 | +    `␊ | 
|  | 24 | +    > 1 | new Response(JSON.stringify(data))␊ | 
|  | 25 | +        |              ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 26 | +    ` | 
|  | 27 | + | 
|  | 28 | +## invalid(2): new Response(JSON.stringify(data), extraArgument) | 
|  | 29 | + | 
|  | 30 | +> Input | 
|  | 31 | +
 | 
|  | 32 | +    `␊ | 
|  | 33 | +      1 | new Response(JSON.stringify(data), extraArgument)␊ | 
|  | 34 | +    ` | 
|  | 35 | + | 
|  | 36 | +> Output | 
|  | 37 | +
 | 
|  | 38 | +    `␊ | 
|  | 39 | +      1 | Response.json(data, extraArgument)␊ | 
|  | 40 | +    ` | 
|  | 41 | + | 
|  | 42 | +> Error 1/1 | 
|  | 43 | +
 | 
|  | 44 | +    `␊ | 
|  | 45 | +    > 1 | new Response(JSON.stringify(data), extraArgument)␊ | 
|  | 46 | +        |              ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 47 | +    ` | 
|  | 48 | + | 
|  | 49 | +## invalid(3): new Response( (( JSON.stringify( (( 0, data )), ) )), ) | 
|  | 50 | + | 
|  | 51 | +> Input | 
|  | 52 | +
 | 
|  | 53 | +    `␊ | 
|  | 54 | +      1 | new Response( (( JSON.stringify( (( 0, data )), ) )), )␊ | 
|  | 55 | +    ` | 
|  | 56 | + | 
|  | 57 | +> Output | 
|  | 58 | +
 | 
|  | 59 | +    `␊ | 
|  | 60 | +      1 | Response.json( (( 0, data )), )␊ | 
|  | 61 | +    ` | 
|  | 62 | + | 
|  | 63 | +> Error 1/1 | 
|  | 64 | +
 | 
|  | 65 | +    `␊ | 
|  | 66 | +    > 1 | new Response( (( JSON.stringify( (( 0, data )), ) )), )␊ | 
|  | 67 | +        |                  ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 68 | +    ` | 
|  | 69 | + | 
|  | 70 | +## invalid(4): function foo() { return new // comment Response(JSON.stringify(data)) } | 
|  | 71 | + | 
|  | 72 | +> Input | 
|  | 73 | +
 | 
|  | 74 | +    `␊ | 
|  | 75 | +      1 | function foo() {␊ | 
|  | 76 | +      2 | 	return new // comment␊ | 
|  | 77 | +      3 | 		Response(JSON.stringify(data))␊ | 
|  | 78 | +      4 | }␊ | 
|  | 79 | +    ` | 
|  | 80 | + | 
|  | 81 | +> Output | 
|  | 82 | +
 | 
|  | 83 | +    `␊ | 
|  | 84 | +      1 | function foo() {␊ | 
|  | 85 | +      2 | 	return ( // comment␊ | 
|  | 86 | +      3 | 		Response.json(data))␊ | 
|  | 87 | +      4 | }␊ | 
|  | 88 | +    ` | 
|  | 89 | + | 
|  | 90 | +> Error 1/1 | 
|  | 91 | +
 | 
|  | 92 | +    `␊ | 
|  | 93 | +      1 | function foo() {␊ | 
|  | 94 | +      2 | 	return new // comment␊ | 
|  | 95 | +    > 3 | 		Response(JSON.stringify(data))␊ | 
|  | 96 | +        | 		         ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 97 | +      4 | }␊ | 
|  | 98 | +    ` | 
|  | 99 | + | 
|  | 100 | +## invalid(5): new Response(JSON.stringify(data), {status: 200}) | 
|  | 101 | + | 
|  | 102 | +> Input | 
|  | 103 | +
 | 
|  | 104 | +    `␊ | 
|  | 105 | +      1 | new Response(JSON.stringify(data), {status: 200})␊ | 
|  | 106 | +    ` | 
|  | 107 | + | 
|  | 108 | +> Output | 
|  | 109 | +
 | 
|  | 110 | +    `␊ | 
|  | 111 | +      1 | Response.json(data, {status: 200})␊ | 
|  | 112 | +    ` | 
|  | 113 | + | 
|  | 114 | +> Error 1/1 | 
|  | 115 | +
 | 
|  | 116 | +    `␊ | 
|  | 117 | +    > 1 | new Response(JSON.stringify(data), {status: 200})␊ | 
|  | 118 | +        |              ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 119 | +    ` | 
|  | 120 | + | 
|  | 121 | +## invalid(6): foo new (( Response ))(JSON.stringify(data)) | 
|  | 122 | + | 
|  | 123 | +> Input | 
|  | 124 | +
 | 
|  | 125 | +    `␊ | 
|  | 126 | +      1 | foo␊ | 
|  | 127 | +      2 | new (( Response ))(JSON.stringify(data))␊ | 
|  | 128 | +    ` | 
|  | 129 | + | 
|  | 130 | +> Output | 
|  | 131 | +
 | 
|  | 132 | +    `␊ | 
|  | 133 | +      1 | foo␊ | 
|  | 134 | +      2 | ;(( Response.json ))(data)␊ | 
|  | 135 | +    ` | 
|  | 136 | + | 
|  | 137 | +> Error 1/1 | 
|  | 138 | +
 | 
|  | 139 | +    `␊ | 
|  | 140 | +      1 | foo␊ | 
|  | 141 | +    > 2 | new (( Response ))(JSON.stringify(data))␊ | 
|  | 142 | +        |                    ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 143 | +    ` | 
|  | 144 | + | 
|  | 145 | +## invalid(7): foo; new (( Response ))(JSON.stringify(data)) | 
|  | 146 | + | 
|  | 147 | +> Input | 
|  | 148 | +
 | 
|  | 149 | +    `␊ | 
|  | 150 | +      1 | foo;␊ | 
|  | 151 | +      2 | new (( Response ))(JSON.stringify(data))␊ | 
|  | 152 | +    ` | 
|  | 153 | + | 
|  | 154 | +> Output | 
|  | 155 | +
 | 
|  | 156 | +    `␊ | 
|  | 157 | +      1 | foo;␊ | 
|  | 158 | +      2 | (( Response.json ))(data)␊ | 
|  | 159 | +    ` | 
|  | 160 | + | 
|  | 161 | +> Error 1/1 | 
|  | 162 | +
 | 
|  | 163 | +    `␊ | 
|  | 164 | +      1 | foo;␊ | 
|  | 165 | +    > 2 | new (( Response ))(JSON.stringify(data))␊ | 
|  | 166 | +        |                    ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 167 | +    ` | 
|  | 168 | + | 
|  | 169 | +## invalid(8): foo; (( new (( Response ))(JSON.stringify(data)) )) | 
|  | 170 | + | 
|  | 171 | +> Input | 
|  | 172 | +
 | 
|  | 173 | +    `␊ | 
|  | 174 | +      1 | foo;␊ | 
|  | 175 | +      2 | (( new (( Response ))(JSON.stringify(data)) ))␊ | 
|  | 176 | +    ` | 
|  | 177 | + | 
|  | 178 | +> Output | 
|  | 179 | +
 | 
|  | 180 | +    `␊ | 
|  | 181 | +      1 | foo;␊ | 
|  | 182 | +      2 | (( (( Response.json ))(data) ))␊ | 
|  | 183 | +    ` | 
|  | 184 | + | 
|  | 185 | +> Error 1/1 | 
|  | 186 | +
 | 
|  | 187 | +    `␊ | 
|  | 188 | +      1 | foo;␊ | 
|  | 189 | +    > 2 | (( new (( Response ))(JSON.stringify(data)) ))␊ | 
|  | 190 | +        |                       ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 191 | +    ` | 
|  | 192 | + | 
|  | 193 | +## invalid(9): foo (( new (( Response ))(JSON.stringify(data)) )) | 
|  | 194 | + | 
|  | 195 | +> Input | 
|  | 196 | +
 | 
|  | 197 | +    `␊ | 
|  | 198 | +      1 | foo␊ | 
|  | 199 | +      2 | (( new (( Response ))(JSON.stringify(data)) ))␊ | 
|  | 200 | +    ` | 
|  | 201 | + | 
|  | 202 | +> Output | 
|  | 203 | +
 | 
|  | 204 | +    `␊ | 
|  | 205 | +      1 | foo␊ | 
|  | 206 | +      2 | (( (( Response.json ))(data) ))␊ | 
|  | 207 | +    ` | 
|  | 208 | + | 
|  | 209 | +> Error 1/1 | 
|  | 210 | +
 | 
|  | 211 | +    `␊ | 
|  | 212 | +      1 | foo␊ | 
|  | 213 | +    > 2 | (( new (( Response ))(JSON.stringify(data)) ))␊ | 
|  | 214 | +        |                       ^^^^^^^^^^^^^^ Prefer using \`Response.json(…)\` over \`JSON.stringify()\`.␊ | 
|  | 215 | +    ` | 
0 commit comments