示例#1
0
 it('should present string as strings', function () {
   expect(toUser('foo')).to.be('foo');
 });
示例#2
0
 it('should present numbers as strings', function () {
   expect(toUser(400)).to.be('400');
 });
示例#3
0
 it('should present query_string queries without a query as an empty string', function () {
   expect(toUser({ query_string: {} })).to.be('');
 });
示例#4
0
 it('should present query_string queries as strings', function () {
   expect(toUser({ query_string: { query: 'lucene query string' } })).to.be('lucene query string');
 });
示例#5
0
 it('should present objects as strings', function () {
   expect(toUser({foo: 'bar'})).to.be('{"foo":"bar"}');
 });
示例#6
0
 it('should present null as empty string', function () {
   expect(toUser(null)).to.be('');
 });
示例#7
0
 it('should present undefined as empty string', function () {
   let notDefined;
   expect(toUser(notDefined)).to.be('');
 });