GTEMatchExpression.js 621 B

12345678910111213141516171819202122
  1. "use strict";
  2. var assert = require("assert"),
  3. GTEMatchExpression = require("../../../../lib/pipeline/matcher/GTEMatchExpression");
  4. module.exports = {
  5. "GTEMatchExpression": {
  6. "should match scalars and strings properly": function (){
  7. var e = new GTEMatchExpression();
  8. var s = e.init('x',5);
  9. assert.strictEqual(s.code, 'OK');
  10. assert.ok( e.matches({'x':5}) );
  11. assert.ok( ! e.matches({'x':4}) );
  12. assert.ok( e.matches({'x':6}) );
  13. assert.ok( ! e.matches({'x': 'eliot'}) );
  14. }
  15. }
  16. };
  17. if (!module.parent)(new(require("mocha"))()).ui("exports").reporter("spec").addFile(__filename).run(process.exit);