@@ -131,7 +131,7 @@ describe("emitter-fetch-client", () => {
131
131
) ;
132
132
assert . match (
133
133
contents ,
134
- / e x p o r t t y p e l i s t P e t s R e s p o n s e B o d y = { p e t s : P e t \[ \] } ; /
134
+ / e x p o r t t y p e l i s t P e t s R e s p o n s e B o d y = { \n \s + d a t a : { p e t s : P e t F r o m O p e r a t i o n \[ \] } ; \n \s + s t a t u s C o d e : 2 0 0 ; \n \s + } ; /
135
135
) ;
136
136
} ) ;
137
137
@@ -145,7 +145,7 @@ describe("emitter-fetch-client", () => {
145
145
it ( "emits the route callback type" , ( ) => {
146
146
assert . match (
147
147
contents ,
148
- / e x p o r t i n t e r f a c e C l i e n t \{ ( \n | .) * l i s t P e t s : \( ( \n | .) * a r g s : l i s t P e t s C l i e n t A r g s , ( \n | .) * o p t i o n s \? : R e q u e s t I n i t , ( \n | .) * \) = > P r o m i s e < l i s t P e t s R e s p o n s e B o d y > ; ( \n | .) * \} /
148
+ / e x p o r t i n t e r f a c e C l i e n t \{ ( \n | .) * l i s t P e t s : \( ( \n | .) * a r g s \? : l i s t P e t s C l i e n t A r g s , ( \n | .) * o p t i o n s \? : R e q u e s t I n i t , ( \n | .) * \) = > P r o m i s e < l i s t P e t s R e s p o n s e B o d y > ; ( \n | .) * \} /
149
149
) ;
150
150
} ) ;
151
151
@@ -163,7 +163,7 @@ describe("emitter-fetch-client", () => {
163
163
assert . match ( contents , / e x p o r t t y p e g e t P e t P a r a m s = \{ p e t I d : s t r i n g \} ; / ) ;
164
164
assert . match (
165
165
contents ,
166
- / e x p o r t t y p e g e t P e t R e s p o n s e B o d y = \{ p e t : P e t \} \| \{ e r r o r : N o t F o u n d E r r o r \ }; /
166
+ / e x p o r t t y p e g e t P e t R e s p o n s e B o d y = \n \s + \| { d a t a : { p e t : P e t F r o m O p e r a t i o n } ; s t a t u s C o d e : 2 0 0 } \n \s + \| { d a t a : { e r r o r : N o t F o u n d E r r o r F r o m O p e r a t i o n } ; s t a t u s C o d e : 2 0 0 } ; /
167
167
) ;
168
168
} ) ;
169
169
@@ -192,7 +192,7 @@ describe("emitter-fetch-client", () => {
192
192
assert . match ( contents , / e x p o r t t y p e c r e a t e P e t B o d y = P e t ; / ) ;
193
193
assert . match (
194
194
contents ,
195
- / e x p o r t t y p e c r e a t e P e t R e s p o n s e B o d y = \ { p e t : P e t \ }; /
195
+ / e x p o r t t y p e c r e a t e P e t R e s p o n s e B o d y = { \n \s + d a t a : { p e t : P e t F r o m O p e r a t i o n } ; \n \s + s t a t u s C o d e : 2 0 0 ; \n \s + } ; /
196
196
) ;
197
197
} ) ;
198
198
@@ -231,7 +231,7 @@ describe("emitter-fetch-client", () => {
231
231
) ;
232
232
assert . match (
233
233
contents ,
234
- / e x p o r t t y p e u p d a t e P e t R e s p o n s e B o d y = \{ p e t : P e t \} \| \{ e r r o r : N o t F o u n d E r r o r \ }; /
234
+ / e x p o r t t y p e u p d a t e P e t R e s p o n s e B o d y = \n \s + \| { d a t a : { p e t : P e t F r o m O p e r a t i o n } ; s t a t u s C o d e : 2 0 0 } \n \s + \| { d a t a : { e r r o r : N o t F o u n d E r r o r F r o m O p e r a t i o n } ; s t a t u s C o d e : 2 0 0 } ; /
235
235
) ;
236
236
} ) ;
237
237
@@ -266,14 +266,14 @@ describe("emitter-fetch-client", () => {
266
266
) ;
267
267
assert . match (
268
268
contents ,
269
- / e x p o r t n a m e s p a c e A n i m a l s \{ ( \n | .) * e x p o r t t y p e l i s t P e t s R e s p o n s e B o d y = { p e t s : P e t \[ \] } ; ( \n | .) * \} /
269
+ / e x p o r t n a m e s p a c e A n i m a l s \{ ( \n | .) * e x p o r t t y p e l i s t P e t s R e s p o n s e B o d y = { \n \s + d a t a : { p e t s : P e t F r o m O p e r a t i o n \[ \] } ; \n \s + s t a t u s C o d e : 2 0 0 ; \n \s + } ; ( \n | .) * \} /
270
270
) ;
271
271
} ) ;
272
272
273
273
it ( "emits the handler type" , ( ) => {
274
274
assert . match (
275
275
contents ,
276
- / e x p o r t n a m e s p a c e A n i m a l s \{ ( \n | .) * l i s t P e t s : ( ( \n | .) * a r g s : l i s t P e t s C l i e n t A r g s , ( \n | .) * o p t i o n s \? : R e q u e s t I n i t , ( \n | .) * ) = > P r o m i s e < l i s t P e t s R e s p o n s e B o d y > ; ( \n | .) * \} /
276
+ / e x p o r t n a m e s p a c e A n i m a l s \{ ( \n | .) * l i s t P e t s : ( ( \n | .) * a r g s \? : l i s t P e t s C l i e n t A r g s , ( \n | .) * o p t i o n s \? : R e q u e s t I n i t , ( \n | .) * ) = > P r o m i s e < l i s t P e t s R e s p o n s e B o d y > ; ( \n | .) * \} /
277
277
) ;
278
278
} ) ;
279
279
@@ -287,7 +287,7 @@ describe("emitter-fetch-client", () => {
287
287
it ( "emits the route callback type" , ( ) => {
288
288
assert . match (
289
289
contents ,
290
- / e x p o r t n a m e s p a c e A n i m a l s \{ ( \n | .) * e x p o r t i n t e r f a c e C l i e n t \{ ( \n | .) * l i s t P e t s : \( ( \n | .) * a r g s : l i s t P e t s C l i e n t A r g s , ( \n | .) * o p t i o n s \? : R e q u e s t I n i t , ( \n | .) * \) = > P r o m i s e < l i s t P e t s R e s p o n s e B o d y > ; ( \n | .) * \} /
290
+ / e x p o r t n a m e s p a c e A n i m a l s \{ ( \n | .) * e x p o r t i n t e r f a c e C l i e n t \{ ( \n | .) * l i s t P e t s : \( ( \n | .) * a r g s \? : l i s t P e t s C l i e n t A r g s , ( \n | .) * o p t i o n s \? : R e q u e s t I n i t , ( \n | .) * \) = > P r o m i s e < l i s t P e t s R e s p o n s e B o d y > ; ( \n | .) * \} /
291
291
) ;
292
292
} ) ;
293
293
0 commit comments