* Creates a test server with authentication enabled
(authConfig)
| 15 | * Creates a test server with authentication enabled |
| 16 | */ |
| 17 | function createAuthServer (authConfig) { |
| 18 | return tenso({ |
| 19 | port: 0, |
| 20 | silent: true, |
| 21 | logging: { enabled: false }, |
| 22 | auth: { |
| 23 | protect: ["/protected.*"], |
| 24 | unprotect: [], |
| 25 | ...authConfig |
| 26 | }, |
| 27 | rate: { enabled: false }, |
| 28 | security: { csrf: false } |
| 29 | }); |
| 30 | } |
| 31 | |
| 32 | /** |
| 33 | * Creates mock request objects for testing |
no test coverage detected