1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-19 18:28:42 +00:00

Use new version of HAWS (#1612)

* Use new version of HAWS

* Fix init page

* Lint

* Fix tests

* Update gitignore

* Clear old tokens, use new key to store
This commit is contained in:
Paulus Schoutsen
2018-08-31 09:45:58 +02:00
committed by GitHub
parent ab19dbc35e
commit 45cdb5a3e4
35 changed files with 176 additions and 456 deletions

View File

@@ -4,19 +4,17 @@ import canToggleDomain from '../../../src/common/entity/can_toggle_domain';
describe('canToggleDomain', () => {
const hass = {
config: {
services: {
light: {
turn_on: null, // Service keys only need to be present for test
turn_off: null,
},
lock: {
lock: null,
unlock: null,
},
sensor: {
custom_service: null,
},
services: {
light: {
turn_on: null, // Service keys only need to be present for test
turn_off: null,
},
lock: {
lock: null,
unlock: null,
},
sensor: {
custom_service: null,
},
},
};

View File

@@ -4,12 +4,10 @@ import canToggleState from '../../../src/common/entity/can_toggle_state';
describe('canToggleState', () => {
const hass = {
config: {
services: {
light: {
turn_on: null, // Service keys only need to be present for test
turn_off: null,
},
services: {
light: {
turn_on: null, // Service keys only need to be present for test
turn_off: null,
},
},
};

View File

@@ -4,12 +4,10 @@ import stateCardType from '../../../src/common/entity/state_card_type.js';
describe('stateCardType', () => {
const hass = {
config: {
services: {
light: {
turn_on: null, // Service keys only need to be present for test
turn_off: null,
},
services: {
light: {
turn_on: null, // Service keys only need to be present for test
turn_off: null,
},
},
};

View File

@@ -1,18 +0,0 @@
import { assert } from 'chai';
import parseQuery from '../../../src/common/util/parse_query.js';
describe('parseQuery', () => {
it('works', () => {
assert.deepEqual(parseQuery('hello=world'), { hello: 'world' });
assert.deepEqual(parseQuery('hello=world&drink=soda'), {
hello: 'world',
drink: 'soda',
});
assert.deepEqual(parseQuery('hello=world&no_value&drink=soda'), {
hello: 'world',
no_value: undefined,
drink: 'soda',
});
});
});