Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arcatdmz/createjs-with-jest-and-canvas
A very simple example of using Jest for testing CreateJS-based canvas manipulation results
https://github.com/arcatdmz/createjs-with-jest-and-canvas
canvas createjs easeljs jest
Last synced: about 1 month ago
JSON representation
A very simple example of using Jest for testing CreateJS-based canvas manipulation results
- Host: GitHub
- URL: https://github.com/arcatdmz/createjs-with-jest-and-canvas
- Owner: arcatdmz
- License: mit
- Created: 2019-01-26T06:46:55.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-26T10:29:24.000Z (about 6 years ago)
- Last Synced: 2024-11-12T09:47:12.982Z (3 months ago)
- Topics: canvas, createjs, easeljs, jest
- Language: JavaScript
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# createjs-with-jest-and-canvas
A very simple example of using Jest for testing CreateJS-based canvas manipulation results## install
```sh
$ npm install
```## test
```sh
$ npm run test> [email protected] test .\createjs-with-jest-and-canvas
> jestPASS __tests__/canvas.js
PASS __tests__/createjs.jsTest 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
- Jest: https://jestjs.io/
- jest-environment-jsdom-with-canvas: https://github.com/arcatdmz/jest-environment-jsdom-with-canvas---
https://github.com/arcatdmz/createjs-with-jest-and-canvas