@@ -18,41 +18,19 @@ const mockPullBundleListData = {
1818 name : 'bundle.js' ,
1919 changeType : 'added' ,
2020 bundleChange : {
21- loadTime : {
22- threeG : 3 ,
23- } ,
24- size : {
25- uncompress : 1 ,
26- } ,
27- } ,
28- bundleData : {
29- loadTime : {
30- threeG : 4 ,
31- } ,
32- size : {
33- uncompress : 2 ,
34- } ,
21+ loadTime : { threeG : 3 } ,
22+ size : { uncompress : 1 } ,
3523 } ,
24+ bundleData : { loadTime : { threeG : 4 } , size : { uncompress : 2 } } ,
3625 } ,
3726 {
3827 name : 'bundle.css' ,
3928 changeType : 'removed' ,
4029 bundleChange : {
41- loadTime : {
42- threeG : 7 ,
43- } ,
44- size : {
45- uncompress : 5 ,
46- } ,
47- } ,
48- bundleData : {
49- loadTime : {
50- threeG : 8 ,
51- } ,
52- size : {
53- uncompress : 6 ,
54- } ,
30+ loadTime : { threeG : 7 } ,
31+ size : { uncompress : 5 } ,
5532 } ,
33+ bundleData : { loadTime : { threeG : 8 } , size : { uncompress : 6 } } ,
5634 } ,
5735 ] ,
5836 } ,
@@ -165,40 +143,24 @@ describe('usePullBundleComparisonList', () => {
165143 name : 'bundle.js' ,
166144 changeType : 'added' ,
167145 bundleChange : {
168- loadTime : {
169- threeG : 3 ,
170- } ,
171- size : {
172- uncompress : 1 ,
173- } ,
146+ loadTime : { threeG : 3 } ,
147+ size : { uncompress : 1 } ,
174148 } ,
175149 bundleData : {
176- loadTime : {
177- threeG : 4 ,
178- } ,
179- size : {
180- uncompress : 2 ,
181- } ,
150+ loadTime : { threeG : 4 } ,
151+ size : { uncompress : 2 } ,
182152 } ,
183153 } ,
184154 {
185155 name : 'bundle.css' ,
186156 changeType : 'removed' ,
187157 bundleChange : {
188- loadTime : {
189- threeG : 7 ,
190- } ,
191- size : {
192- uncompress : 5 ,
193- } ,
158+ loadTime : { threeG : 7 } ,
159+ size : { uncompress : 5 } ,
194160 } ,
195161 bundleData : {
196- loadTime : {
197- threeG : 8 ,
198- } ,
199- size : {
200- uncompress : 6 ,
201- } ,
162+ loadTime : { threeG : 8 } ,
163+ size : { uncompress : 6 } ,
202164 } ,
203165 } ,
204166 ] ,
@@ -242,7 +204,7 @@ describe('usePullBundleComparisonList', () => {
242204 consoleSpy . mockRestore ( )
243205 } )
244206
245- it ( 'throws a 404 ' , async ( ) => {
207+ it ( 'throws a 400 ' , async ( ) => {
246208 setup ( { isUnsuccessfulParseError : true } )
247209 const { result } = renderHook (
248210 ( ) =>
@@ -259,8 +221,8 @@ describe('usePullBundleComparisonList', () => {
259221 await waitFor ( ( ) =>
260222 expect ( result . current . error ) . toEqual (
261223 expect . objectContaining ( {
262- status : 404 ,
263- data : null ,
224+ dev : 'usePullBundleComparisonList - Parsing Error' ,
225+ status : 400 ,
264226 } )
265227 )
266228 )
@@ -294,8 +256,8 @@ describe('usePullBundleComparisonList', () => {
294256 await waitFor ( ( ) =>
295257 expect ( result . current . error ) . toEqual (
296258 expect . objectContaining ( {
259+ dev : 'usePullBundleComparisonList - Not Found Error' ,
297260 status : 404 ,
298- data : { } ,
299261 } )
300262 )
301263 )
@@ -329,6 +291,7 @@ describe('usePullBundleComparisonList', () => {
329291 await waitFor ( ( ) =>
330292 expect ( result . current . error ) . toEqual (
331293 expect . objectContaining ( {
294+ dev : 'usePullBundleComparisonList - Owner Not Activated' ,
332295 status : 403 ,
333296 } )
334297 )
0 commit comments