Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeRender() {
// Turn off batched updates
document.open();
// Init rem unit
setRem( this.getDeviceWidth() / this.getViewportWidth() );
},
beforeRender() {
// Init rem unit
setRem(this.getDeviceWidth() / this.getViewportWidth());
},
it('convert rem unit style to css', () => {
setRem(1);
let css = styleToCSS({
width: '750rem'
});
expect(css).toBe('width:750rem;');
let css2 = styleToCSS({
width: 750
});
expect(css2).toBe('width:750rem;');
let css3 = styleToCSS({
width: '750px'
});
expect(css3).toBe('width:750px;');