method MockServiceRegistry.prototype.unregister
MockServiceRegistry.prototype.unregister(token: CapabilityToken): boolean

Removes a registration. On a multi-provider token this removes EVERY provider registered under it, not just the first.

Parameters

token: CapabilityToken

The capability token to remove

Return Type

boolean

true if a registration was removed

Throws

Error

If called after the application has run runBootstrap()

Usage

import { MockServiceRegistry } from "testing/src/index.ts";