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

docs: fix some typos #104

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/mock/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('mock', () => {

/**
* This test is very special, because it helps increase the code coverage to 100%. It patches
* console.error to supress calls to console.error, sets an internal dataset value to force the
* console.error to suppress calls to console.error, sets an internal dataset value to force the
* getContext() function to call it's internal getContext() provided by jsdom.
*/
it('should call internal function if "canvas" is installed', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/mock/prototype.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default function mockPrototype() {
const getContext2D = jest.fn(function getContext2d(type) {
if (type === '2d') {
/**
* Contexts must be indempotent. Once they are generated, they should be returned when
* Contexts must be idempotent. Once they are generated, they should be returned when
* getContext() is called on the same canvas object multiple times.
*/
if (generatedContexts.has(this)) return generatedContexts.get(this);
Expand Down
2 changes: 1 addition & 1 deletion src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default (win) => {

// [email protected] || jest@^22.0.0, console.error in Function getContext();
// https://github.com/jsdom/jsdom/blob/4c7698f760fc64f20b2a0ddff450eddbdd193176/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js#L55-L58
// cosole.error will make ci error.
// console.error will make ci error.
// try {
// // get the context 2d.
// const ctx = d.createElement('canvas').getContext('2d');
Expand Down
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface CanvasRenderingContext2DEvent {
/**
* This is the type of canvas event that occured.
* This is the type of canvas event that occurred.
*/
type: string;
/**
Expand Down