better path2 polifill for node envs

This commit is contained in:
Anton Lavrevov
2025-08-23 05:16:02 -05:00
parent 472219adb4
commit e2c0a719b9
3 changed files with 10 additions and 20 deletions

View File

@@ -1,13 +1,3 @@
export async function mochaGlobalSetup() {
await import('../src/canvas-backend.ts');
globalThis.Path2D ??= class Path2D {
constructor(path) {
this.path = path;
}
get [Symbol.toStringTag]() {
return `Path2D`;
}
};
}

View File

@@ -1,13 +1,3 @@
export async function mochaGlobalSetup() {
await import('../src/skia-backend.ts');
globalThis.Path2D ??= class Path2D {
constructor(path) {
this.path = path;
}
get [Symbol.toStringTag]() {
return `Path2D`;
}
};
}