frontend/js/util.js
Adam Mills 70c082716f MVP tests for hass-util.html (#629)
* MVP tests for hass-util.html

* MVP util.js to allow individual JS function export

* Use mocha to unit test js logic

* Isolate mocha test directory

* Move mocha opts to separate file

* Default export of util function

* Use reify for mocha tests instead of babel
2017-11-15 21:42:54 -08:00

14 lines
426 B
JavaScript

/**
* Export hass util functions to window.
*
* This file is a workaround for the fact that Polymer 2 doesn't work well with
* ES6 JS imports. Once we move to Polymer 3, we should be able to simply
* import these functions where we need them.
*/
import attributeClassNames from './common/util/attribute_class_names';
window.hassUtil = window.hassUtil || {};
window.hassUtil.attributeClassNames = attributeClassNames;