@@ -18,7 +18,10 @@ void main() {
1818
1919 test ('toMap contains all header entries' , () {
2020 const m = HeaderMiddleware (
21- headers: {'Authorization' : 'Bearer tok' , 'Content-Type' : 'application/json' },
21+ headers: {
22+ 'Authorization' : 'Bearer tok' ,
23+ 'Content-Type' : 'application/json'
24+ },
2225 );
2326 final map = m.toMap ();
2427 final headers = map['headers' ] as Map ;
@@ -52,7 +55,8 @@ void main() {
5255 headers: {'X-Custom' : 'value with spaces & symbols = true' },
5356 );
5457 final map = m.toMap ();
55- expect ((map['headers' ] as Map )['X-Custom' ], 'value with spaces & symbols = true' );
58+ expect ((map['headers' ] as Map )['X-Custom' ],
59+ 'value with spaces & symbols = true' );
5660 });
5761
5862 test ('toMap has type, headers, urlPattern keys' , () {
@@ -135,7 +139,8 @@ void main() {
135139 });
136140
137141 test ('String value round-trips' , () {
138- const m = RemoteConfigMiddleware (values: {'baseUrl' : 'https://prod.api.com' });
142+ const m =
143+ RemoteConfigMiddleware (values: {'baseUrl' : 'https://prod.api.com' });
139144 expect ((m.toMap ()['values' ] as Map )['baseUrl' ], 'https://prod.api.com' );
140145 });
141146
@@ -199,7 +204,8 @@ void main() {
199204 final middlewares = < Middleware > [
200205 const HeaderMiddleware (headers: {'X-Auth' : 'Bearer tok' }),
201206 const LoggingMiddleware (logUrl: 'https://logs.io' ),
202- const RemoteConfigMiddleware (values: {'timeout' : 30 }, workerType: 'HttpDownload' ),
207+ const RemoteConfigMiddleware (
208+ values: {'timeout' : 30 }, workerType: 'HttpDownload' ),
203209 ];
204210 final maps = middlewares.map ((m) => m.toMap ()).toList ();
205211 expect (maps[0 ]['type' ], 'header' );
@@ -224,13 +230,15 @@ void main() {
224230
225231 test ('LoggingMiddleware type key is stable across instances' , () {
226232 const m1 = LoggingMiddleware (logUrl: 'https://logs1.example.com' );
227- const m2 = LoggingMiddleware (logUrl: 'https://logs2.example.com' , includeConfig: true );
233+ const m2 = LoggingMiddleware (
234+ logUrl: 'https://logs2.example.com' , includeConfig: true );
228235 expect (m1.toMap ()['type' ], m2.toMap ()['type' ]);
229236 });
230237
231238 test ('RemoteConfigMiddleware type key is stable across instances' , () {
232239 const m1 = RemoteConfigMiddleware (values: {'a' : 1 });
233- const m2 = RemoteConfigMiddleware (values: {'b' : 2 }, workerType: 'HttpDownload' );
240+ const m2 =
241+ RemoteConfigMiddleware (values: {'b' : 2 }, workerType: 'HttpDownload' );
234242 expect (m1.toMap ()['type' ], m2.toMap ()['type' ]);
235243 });
236244
@@ -255,23 +263,28 @@ void main() {
255263 // ──────────────────────────────────────────────────────────────
256264 group ('LoggingMiddleware – post-execution payload contract' , () {
257265 test ('toMap carries logUrl for native POST' , () {
258- const m = LoggingMiddleware (logUrl: 'https://telemetry.example.com/tasks' );
266+ const m =
267+ LoggingMiddleware (logUrl: 'https://telemetry.example.com/tasks' );
259268 expect (m.toMap ()['logUrl' ], 'https://telemetry.example.com/tasks' );
260269 });
261270
262271 test ('includeConfig=false does not include config in map keys' , () {
263272 // The Dart map is the registration payload sent to native.
264273 // When includeConfig=false, the native side must NOT attach workerConfig.
265- const m = LoggingMiddleware (logUrl: 'https://logs.io' , includeConfig: false );
274+ const m =
275+ LoggingMiddleware (logUrl: 'https://logs.io' , includeConfig: false );
266276 expect (m.toMap ()['includeConfig' ], isFalse);
267277 });
268278
269279 test ('includeConfig=true is forwarded to native' , () {
270- const m = LoggingMiddleware (logUrl: 'https://logs.io' , includeConfig: true );
280+ const m =
281+ LoggingMiddleware (logUrl: 'https://logs.io' , includeConfig: true );
271282 expect (m.toMap ()['includeConfig' ], isTrue);
272283 });
273284
274- test ('type is "logging" so native skips applyMiddleware (pre-exec) correctly' , () {
285+ test (
286+ 'type is "logging" so native skips applyMiddleware (pre-exec) correctly' ,
287+ () {
275288 // applyMiddleware() on both platforms has a case "logging": break/skip.
276289 // This test documents the contract: type must be exactly "logging".
277290 const m = LoggingMiddleware (logUrl: 'https://x.com' );
0 commit comments