misc-functions.test.js 502 B

123456789101112
  1. $ = jQuery = require('jquery');
  2. const miscFunctions = require('./misc-functions');
  3. const changeDesign = miscFunctions.__get__('changeDesign');
  4. describe('changeDesign', () => {
  5. it('does not throw with empty argument.', () => {expect(() => changeDesign()).not.toThrow();});
  6. it('has empty background-image URL.', () => {
  7. changeDesign({backgroundimage: false, backgroundcolor: false, linkcolor: false});
  8. expect(document.querySelector('body').style['background-image']).toBe('url()')
  9. });
  10. });