From de88ae1844bb08f1e269c36497c47275aeea7a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D1=83=D0=B4=D0=BA=D0=B8=D0=BD=20=D0=90=D1=80=D1=82?= =?UTF-8?q?=D0=B5=D0=BC=20=D0=92=D0=B0=D0=BB=D0=B5=D0=BD=D1=82=D0=B8=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=87?= Date: Tue, 10 Oct 2017 13:47:30 +0300 Subject: [PATCH] simplest test for circular links --- tests/get.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/get.js b/tests/get.js index 1457c08..e872ffa 100644 --- a/tests/get.js +++ b/tests/get.js @@ -374,3 +374,20 @@ describe('real life example', function(){ assert.deepEqual(actual, expected); }); }); + +/* +describe('simple circular link', function(){ + const x = { + "a": { + "x":1, + "y":2, + } + }; + x.a.z = x.a; + + it('"a x" of x -> 1',function(){ + let actual = get(x, "x a"); + assert.deepEqual(actual, 1); + }); +}); +*/ \ No newline at end of file