@voltro/testing 0.81.0 → 0.83.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4551,7 +4551,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
4551
4551
  SOFTWARE.
4552
4552
  ```
4553
4553
 
4554
- ## undici@8.10.0
4554
+ ## undici@8.11.2
4555
4555
 
4556
4556
  License: MIT
4557
4557
 
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { AnonymousPolicy } from '@voltro/protocol';
1
2
  import { AppContext } from '@voltro/runtime';
2
3
  import { AuthStrategy } from '@voltro/protocol';
3
4
  import { changeDelete } from '@voltro/database';
@@ -368,9 +369,12 @@ export declare interface MakeTestAppOptions {
368
369
  * itself the behaviour most worth testing, and the one `invoke` cannot reach.
369
370
  */
370
371
  readonly strategies?: ReadonlyArray<AuthStrategy>;
371
- /** Refuse an anonymous caller that carries no tenant (`Unauthenticated`).
372
- * Passed straight to `composeAuthStrategies`. */
373
- readonly anonymousTenantRequired?: boolean;
372
+ /** What an unauthenticated caller is — the app's `auth.anonymous`
373
+ * (`'refuse' | 'no-tenant' | 'header' | { tenantId }`), passed straight to
374
+ * `composeAuthStrategies`. Default: the `voltro dev` convenience — the
375
+ * `x-tenant` header's tenant, else `acme` — so a test sees what the dev
376
+ * server would; pass the app's own decision to see what serve would. */
377
+ readonly anonymous?: AnonymousPolicy;
374
378
  /** HTTP idempotency binding — the same `{ store, header, ttlMs }` the serve
375
379
  * path builds from `app.config.ts`'s `idempotency` field. */
376
380
  readonly idempotency?: RestServeBindings['idempotency'];
@@ -641,10 +645,16 @@ export declare class MockWebhooks {
641
645
  * testable. */
642
646
  emit<P>(event: string | {
643
647
  readonly id?: string;
648
+ readonly name?: string;
644
649
  readonly event?: string;
645
650
  }, payload: P): Promise<{
646
651
  readonly delivered: number;
647
652
  }>;
653
+ /** Mirrors `WebhooksServiceShape.listTargets`. No targets are subscribed
654
+ * here, so a handler that reads them — a status page, a health check — gets
655
+ * the empty list the real service gives an app that has none, instead of
656
+ * throwing because the recorder lacked the method. */
657
+ listTargets(_event?: string, _scope?: Readonly<Record<string, unknown>>): Promise<ReadonlyArray<never>>;
648
658
  /** Every payload emitted for one event, oldest first. */
649
659
  payloadsFor(event: string): ReadonlyArray<unknown>;
650
660
  /** The most recent emission of an event, or undefined. */