mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 10:48:44 +00:00
* 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
19 lines
491 B
JavaScript
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',
|
|
});
|
|
});
|
|
});
|