persvr / rql

Resource Query Language
http://www.persvr.org/
268 stars 49 forks source link

fix tests failing from #46 #47

Closed neonstalwart closed 9 years ago

neonstalwart commented 9 years ago

this extends on #46 which helped identify that tests weren't being run

neonstalwart commented 9 years ago

@kriszyp there are 2 decisions i made as part of this PR that i'd like to run by you:

  1. in 99171e6 i've allowed parsed terms to define the name of the top term. this means that a|(b&c) is now valid whereas previously, the | conjunction wanted to define the name of the top term but the code threw an error because an empty query is already defined with an 'and' name so it had to be (a|(b&c)) which seemed unnecessary.
  2. in 030640d i've added code to skip the a(date:2009) test in environments that do not support passing a date string to the Date constructor (i.e. new Date('2009')). this means this test is skipped on IE8.