avocado/packages/graphics/test/image.js
2021-05-09 18:13:35 -05:00

20 lines
488 B
JavaScript

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