From d25346fc380328d03d12f33fe185c2dc557e1808 Mon Sep 17 00:00:00 2001 From: Lukas Klinzing Date: Sun, 8 Jul 2018 19:11:50 +0200 Subject: [PATCH] Updating Tests to show extending predicates as in docs does not work As described in #31 I found out, that the Test case is incomplete and indeed throws an error when correctly defined using a schema. The validation then seems to throw an error. So the way it is described in the docs, does not work properly. --- test/predicate.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/predicate.test.js b/test/predicate.test.js index 8f92031..0ca9fe1 100644 --- a/test/predicate.test.js +++ b/test/predicate.test.js @@ -27,7 +27,13 @@ let engine = new Engine([ conditions: { age: { range: [20, 40] } }, event: "hit", }, -]); +], { + properties: { + age: { + type: 'number' + } + } +}); test("not in range left", () => { return engine.run({ age: 10 }).then(events => expect(events).toEqual([]));