add query string
This commit is contained in:
parent
ccf6b48bdc
commit
aa35c3ef4c
13 changed files with 349 additions and 0 deletions
17
dashboard-ui/bower_components/query-string/test/extract.js
vendored
Normal file
17
dashboard-ui/bower_components/query-string/test/extract.js
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
import test from 'ava';
|
||||
import fn from '../';
|
||||
|
||||
test('should extract query string from url', t => {
|
||||
t.is(fn.extract('http://foo.bar/?abc=def&hij=klm'), 'abc=def&hij=klm');
|
||||
t.is(fn.extract('http://foo.bar/?'), '');
|
||||
});
|
||||
|
||||
test('should handle strings not containing query string', t => {
|
||||
t.is(fn.extract('http://foo.bar/'), '');
|
||||
t.is(fn.extract(''), '');
|
||||
});
|
||||
|
||||
test('should throw for invalid values', t => {
|
||||
t.throws(fn.extract.bind(fn, null), TypeError);
|
||||
t.throws(fn.extract.bind(fn, undefined), TypeError);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue