parser.js 771 B

12345678910111213141516171819202122232425
  1. define([
  2. "esquery",
  3. "jstestr/assert",
  4. "jstestr/test",
  5. ], function (esquery, assert, test) {
  6. test.defineSuite("basic query parsing", {
  7. "empty query": function () {
  8. assert.isEqual(void 0, esquery.parse(""));
  9. assert.isEqual(void 0, esquery.parse(" "));
  10. },
  11. "leading/trailing whitespace": function () {
  12. assert.isNotEqual(void 0, esquery.parse(" A"));
  13. assert.isNotEqual(void 0, esquery.parse(" A"));
  14. assert.isNotEqual(void 0, esquery.parse("A "));
  15. assert.isNotEqual(void 0, esquery.parse("A "));
  16. assert.isNotEqual(void 0, esquery.parse(" A "));
  17. assert.isNotEqual(void 0, esquery.parse(" A "));
  18. }
  19. });
  20. });