@tdb/util
Version:
Shared helpers and utilities.
21 lines • 826 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var chai_1 = require("chai");
var css_1 = require("../css");
describe('React: CSS', function () {
it('is a function', function () {
chai_1.expect(css_1.transformStyle).to.be.an.instanceof(Function);
});
it('returns the given object', function () {
var style = { color: 'red' };
chai_1.expect(css_1.transformStyle(style)).to.equal(style);
});
it('returns an empty object if no `style` parameter is given', function () {
chai_1.expect(css_1.transformStyle()).to.eql({});
});
it('removes undefined values', function () {
var style = { color: undefined, background: null };
chai_1.expect(css_1.transformStyle(style)).to.eql({});
});
});
//# sourceMappingURL=css.test.js.map