jtenner

Results 143 comments of jtenner

Yeah. I recently had to bootstrap this library without using jest so I could test a few wasm simd functions in my canvas library. I want to think on this...

I believe this can be fixed by checking to see if `jest` exists in the global scope. If it doesn't we can just polyfill `jest.fn` to be an identity function....

I will likely start to tackle this soon. I feel like people should be able to import this module without having to do any setup. This means testing the module...

I believe this is still worth using. Perhaps the core functionality of emulating the `CanvasRenderingContext2D` class can be in it's own package?

I don't entirely know the right answer. It would be nice for someone else to pick up the responsibility, because I'm only good at the canvas part. :)

Right. These functions are very difficult to account for. We would need to use some kind of cpu bound to keep track of image data. At the moment, this is...

See now that I think about it, it looks like `node-canvas` is *very* accessible. I am going to do some investigation to see if we can physically replace a lot...

Yes. You need to manually mock that function. Do you know how to the jest mock api to force different return values?

I believe this library was initially created to do almost zero validation of user input. When I refactored and created the second version, emulating the save stack, I did not...

Yep. You need to mock the return value.