mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-10 17:39:31 +02:00
* Standardize filenames to kebab-case Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com> * Move script outside of public folder * Move update_exp_sprites to scripts * Add ls-lint to lint file and directory names * Update lefthook.yml to skip merge / rebase on all pre-commit commands --------- Co-authored-by: pymilkmaiden <cassiopeiamahler56@gmail.com>
27 lines
484 B
TypeScript
27 lines
484 B
TypeScript
/**
|
|
* A minimal stub object to mock HTMLCanvasElement
|
|
*/
|
|
export const mockCanvas: any = {
|
|
width: 0,
|
|
getContext() {
|
|
return mockContext;
|
|
},
|
|
};
|
|
/**
|
|
* A minimal stub object to mock CanvasRenderingContext2D
|
|
*/
|
|
export const mockContext: any = {
|
|
font: "",
|
|
measureText: () => {
|
|
return {};
|
|
},
|
|
save: () => {},
|
|
scale: () => {},
|
|
clearRect: () => {},
|
|
fillRect: () => {},
|
|
fillText: () => {},
|
|
getImageData: () => {},
|
|
canvas: mockCanvas,
|
|
restore: () => {},
|
|
};
|