From 18c4b184e529e07f1162eae55ffbf0c2f0f0d67b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 30 Aug 2014 13:19:04 -0700 Subject: [PATCH] Add failing test for actor initial route signalling --- test/test-actor.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/test-actor.js b/test/test-actor.js index c4ed136..1f45794 100644 --- a/test/test-actor.js +++ b/test/test-actor.js @@ -70,3 +70,20 @@ describe("nonempty initial routes", function () { }, [Minimart.updateRoutes([pub(["A", __]).label(1)])]); }); }); + +describe("actor with nonempty initial routes", function () { + it("shouldn't see initial empty conversational context", function () { + checkTrace(function (trace) { + World.spawn({ handleEvent: function (e) { + World.spawn(new Actor(function () { + Actor.observeAdvertisers( + function () { return ["A", __] }, + { presence: "isPresent" }, + function () { + trace(["isPresent", this.isPresent]); + }); + })); + }}, [pub(["A", __])]); + }, [["isPresent", true]]); + }); +});