avocado/packages/graphics/test/image.js

21 lines
519 B
JavaScript
Raw Normal View History

2021-01-02 22:01:57 -06:00
import {assert, expect} from 'chai';
import merge from 'deepmerge';
import {validate} from 'uuid';
import Image from '../src/image';
Image.root = 'test/fixtures';
2021-01-05 11:25:37 -06:00
describe('Image', () => {
it("has a sane default", async () => {
const image = new Image();
expect(image.height).to.equal(0);
expect(image.width).to.equal(0);
});
it("can load images", async () => {
const image = await Image.load('/test.png');
expect(image.height).to.equal(16);
expect(image.width).to.equal(16);
2021-01-02 22:01:57 -06:00
});
});