Files
konva/test/node-skia-global-setup.mjs
Nathan Muir 758adcd502 refactor: remove rename-imports scripts
Update approach of dealing with file extensions differences between typescript & node.

Leverages `rewriteRelativeImportExtensions` that was added in typescript 5.7 [1], and that is recommended path by node to run typescript in the future [2]

[1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-7.html#path-rewriting-for-relative-paths

[2] https://nodejs.org/api/typescript.html#type-stripping
2025-08-20 17:12:52 +12:00

14 lines
249 B
JavaScript

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