The resource mock: a MockService plus a direct resolver for tests.
MockService
Resolve a URL exactly as resource.bytes would, without the wire.
resource.bytes
Resource URL.
Bytes and MIME, or a typed failure.
const service = createMockResourceService();service.resolve(LINUX_DISTROS[0].mirrors[0]).ok === true; Copy
const service = createMockResourceService();service.resolve(LINUX_DISTROS[0].mirrors[0]).ok === true;
The resource mock: a
MockServiceplus a direct resolver for tests.