Skip to content

Commit

Permalink
docs: fix some typos (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdufresne authored Nov 28, 2022
1 parent fe7c4df commit 8d7de48
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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) => {

// jsdom@11.6.2 || 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

0 comments on commit 8d7de48

Please sign in to comment.