mirror of
https://github.com/konvajs/konva.git
synced 2025-11-24 08:46:44 +08:00
better path2 polifill for node envs
This commit is contained in:
@@ -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`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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`;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user