1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 10:48:44 +00:00
Files
frontend/test-mocha/common/util/parse_query_test.js
Paulus Schoutsen f70c0aea6c Org files (#1183)
* Organize files

* Import EventsMixin

* Import NavigateMixin

* Dissolve window.hassMixins

* Apply ElementMixin when we use it

* Update tests to point at right dir

* Eslint

* Clean

* Update mixins inside hassio

* Update lint command"

* Fix polymer lint
2018-05-16 13:47:34 -04:00

19 lines
491 B
JavaScript

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',
});
});
});