Skip to content

A very simple example of using Jest for testing CreateJS-based canvas manipulation results

License

Notifications You must be signed in to change notification settings

arcatdmz/createjs-with-jest-and-canvas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

createjs-with-jest-and-canvas

A very simple example of using Jest for testing CreateJS-based canvas manipulation results

install

$ npm install

test

$ npm run test

> createjs-with-jest-and-canvas@1.0.0 test .\createjs-with-jest-and-canvas
> jest

 PASS  __tests__/canvas.js
 PASS  __tests__/createjs.js

Test Suites: 2 passed, 2 total
Tests:       6 passed, 6 total
Snapshots:   0 total
Time:        5.597s
Ran all test suites.

code

  • jest.config.js: uses jest-environment-jsdom-with-canvas as the Jest environment
  • __tests__/canvas.js: example tests involving raw Canvas APIs
  • __tests__/createjs.js: example tests involving CreateJS (EaselJS) APIs

see also


https://github.com/arcatdmz/createjs-with-jest-and-canvas

About

A very simple example of using Jest for testing CreateJS-based canvas manipulation results

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published