import 'babel-polyfill';
import { before, describe, it } from 'mocha';
import React from 'react';
import chai from 'chai';
import fileSystem from 'fs';
import grumpkin from 'grumpkin';
chai.should();
describe('grumpkin', () => {
let stylesheet = null;
before((done) => {
fileSystem.readFile('./test/style.css', 'utf8', (exception, readData) => {
stylesheet = readData;
done();
});
});
it('simple render', () => {
const element = <div className="foo" id="bar">Hello World!</div>;
const computedStyle = grumpkin(element, stylesheet);
computedStyle.should.have.property('width').and.equal('46px');
computedStyle.should.have.property('height').and.equal('50px');
computedStyle.should.have.property('color').and.equal('#fff');
computedStyle.should.have.property('cursor').and.equal('pointer');
});
});