Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mock): support mocks via __getPath, __getEvents, and __getDrawCalls #38

Merged
merged 11 commits into from
May 6, 2019

Conversation

jtenner
Copy link
Collaborator

@jtenner jtenner commented Apr 30, 2019

This is a very large pull request that enables testing canvas context function call events via:

const events = CanvasRenderingContext2D.__getEvents(ctx);
expect(events).toMatchSnapshot();

Please see the following test files to see how to use this feature:

__tests__\classes\CanvasRenderingContext2D.__getDrawCalls.js
__tests__\classes\CanvasRenderingContext2D.__getPath.js
__tests__\classes\CanvasRenderingContext2D.__getEvents.js

closes #33
closes #39
closes #40

@jtenner jtenner added this to the 2.1.0 milestone Apr 30, 2019
@jtenner jtenner requested a review from hustcc April 30, 2019 19:25
@jtenner jtenner self-assigned this Apr 30, 2019
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 117670b on mock-support into 829a870 on master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 117670b on mock-support into 829a870 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 117670b on mock-support into 829a870 on master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 117670b on mock-support into 829a870 on master.

@coveralls
Copy link

coveralls commented Apr 30, 2019

Coverage Status

Coverage remained the same at 100.0% when pulling 0f133d9 on mock-support into e66874a on master.

@jtenner
Copy link
Collaborator Author

jtenner commented Apr 30, 2019

This pull request is big enough, @hustcc should probably check my work before it's pulled.

@hustcc
Copy link
Owner

hustcc commented May 5, 2019

@jtenner nice work, If the pr is ready, you can just merge it by yourself. 😄

@jtenner
Copy link
Collaborator Author

jtenner commented May 5, 2019

Definitely. I'll do this tomorrow.

@jtenner
Copy link
Collaborator Author

jtenner commented May 5, 2019

I actually need to check that the d.ts file works as intended.

@jtenner jtenner merged commit 7d6239c into master May 6, 2019
@jtenner
Copy link
Collaborator Author

jtenner commented May 6, 2019

@hustcc We can release 2.1.0 now. Thanks!

@jtenner jtenner deleted the mock-support branch May 6, 2019 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants