avocado/packages/graphics/test/image.js
2021-01-22 11:35:23 -06:00

20 lines
500 B
JavaScript

import {assert, expect} from 'chai';
import {validate} from 'uuid';
import {Image} from '../src/resources/image';
Image.root = 'test/fixtures';
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);
});
});