mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-29 18:20:30 +08:00
Improve testing suite
Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
// A simple mock for some HTMLCanvasElement functions to run in a node env.
|
||||
|
||||
HTMLCanvasElement.prototype.getContext = () => ({
|
||||
fillRect: () => null
|
||||
});
|
||||
|
||||
HTMLCanvasElement.prototype.toDataURL = () => null;
|
||||
@@ -0,0 +1,9 @@
|
||||
/* eslint-disable no-undef */
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
if (! globalThis.fetch) {
|
||||
globalThis.fetch = fetch;
|
||||
globalThis.Headers = fetch.Headers;
|
||||
globalThis.Request = fetch.Request;
|
||||
globalThis.Response = fetch.Response;
|
||||
}
|
||||
Reference in New Issue
Block a user