FakeReplica
Defined in: core/src/testing/fake-replica.ts:115
A fake replica installed by installFakeReplica.
Properties
Section titled “Properties”
readonlyhost:string
Defined in: core/src/testing/fake-replica.ts:117
The origin the fake answers for.
rootKey
Section titled “rootKey”
readonlyrootKey:Uint8Array
Defined in: core/src/testing/fake-replica.ts:123
The DER-encoded root key the fake signs certificates with. An agent on a
local host fetches it from the fake; pass it as agentOptions.rootKey
to an agent that does not fetch its root key.
requests
Section titled “requests”
readonlyrequests: readonlyFakeReplicaRequest[]
Defined in: core/src/testing/fake-replica.ts:125
Every request an agent sent to the fake, in order.
Methods
Section titled “Methods”restore()
Section titled “restore()”restore():
void
Defined in: core/src/testing/fake-replica.ts:133
Takes the fake out of globalThis.fetch, putting back the fetch it
replaced, along with any wrapper a test installed around it since.
Calling it again does nothing, and several fakes may be restored in any
order: one installed over this fake keeps its place. An agent built while
the fake was installed keeps calling it.
Returns
Section titled “Returns”void