avocado/packages/graphics/test/image.js
2022-03-14 15:07:47 -05:00

19 lines
449 B
JavaScript

import {expect} from 'chai';
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);
});
});