1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00
Files
frontend/test-mocha/common/entity/compute_domain.js
Paulus Schoutsen 912969111f Move all of hassUtil to JS (#1153)
* Move all of hassUtil to JS

* Fix tests
2018-05-09 21:33:31 -04:00

13 lines
439 B
JavaScript

import { assert } from 'chai';
import computeDomain from '../../../js/common/entity/compute_domain';
describe('computeDomain', () => {
it('Returns domains', () => {
assert.equal(computeDomain('sensor.bla'), 'sensor');
assert.equal(computeDomain('switch.bla'), 'switch');
assert.equal(computeDomain('light.bla'), 'light');
assert.equal(computeDomain('persistent_notification.bla'), 'persistent_notification');
});
});