| 289 | |
| 290 | // Mock protection check function |
| 291 | const checkRouteProtection = url => { |
| 292 | // Check unprotect patterns first |
| 293 | for (const pattern of unprotectPatterns) { |
| 294 | if (pattern.test(url)) return { protected: false, reason: "unprotected" }; |
| 295 | } |
| 296 | |
| 297 | // Check protect patterns |
| 298 | for (const pattern of protectPatterns) { |
| 299 | if (pattern.test(url)) return { protected: true, reason: "protected" }; |
| 300 | } |
| 301 | |
| 302 | return { protected: false, reason: "default" }; |
| 303 | }; |
| 304 | |
| 305 | suite |
| 306 | .add("Route protection - Single URL check", () => { |
no outgoing calls
no test coverage detected