mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 02:38:53 +00:00
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
This commit is contained in:
committed by
Paulus Schoutsen
parent
3ff9fe1041
commit
70c082716f
13
js/util.js
Normal file
13
js/util.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* 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;
|
||||
Reference in New Issue
Block a user