From f844e74ea924a2e12d97632277f3a1059f107c23 Mon Sep 17 00:00:00 2001 From: Justin Meyer Date: Wed, 20 Jul 2016 20:50:54 -0500 Subject: [PATCH] test for #34 --- map/map-test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/map/map-test.js b/map/map-test.js index a12e8ec..6e40bd8 100644 --- a/map/map-test.js +++ b/map/map-test.js @@ -177,3 +177,22 @@ QUnit.test("setting nested object", function(){ m.set({foo: {}}); QUnit.deepEqual(m.get(), {foo: {}}); }); + +QUnit.test("for in works (#34)", function(){ + var MyMap = DefineMap.extend({ + zed: "string", + method: function(){ + + } + }); + + var m = new MyMap({foo: "bar", zed: "ted"}); + + for(var prop in m) { + if(prop === "foo" || prop === "zed") { + QUnit.ok(true, prop) + } else { + QUnit.ok(false, prop); + } + } +});