| 12345678910111213141516171819202122 |
- "use strict";
- var assert = require("assert"),
- GTMatchExpression = require("../../../../lib/pipeline/matcher/GTMatchExpression");
- module.exports = {
- "GTMatchExpression": {
- "should match scalars and strings properly": function (){
- var e = new GTMatchExpression();
- var s = e.init('x',5);
- assert.strictEqual(s.code, 'OK');
- assert.ok( ! e.matches({'x':5}) );
- assert.ok( ! e.matches({'x':4}) );
- assert.ok( e.matches({'x':6}) );
- assert.ok( ! e.matches({'x': 'eliot'}) );
- }
- }
- };
- if (!module.parent)(new(require("mocha"))()).ui("exports").reporter("spec").addFile(__filename).run(process.exit);
|