From 11d411c9a91947e270c72b6b7e51714fc69a003d Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 2 Jul 2021 15:59:29 +0530 Subject: [PATCH] Add failing test For empty names not un-disambiguating Signed-off-by: RMidhunSuresh --- src/domain/session/rightpanel/disambiguator.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/domain/session/rightpanel/disambiguator.js b/src/domain/session/rightpanel/disambiguator.js index 153fc6c1..44acc733 100644 --- a/src/domain/session/rightpanel/disambiguator.js +++ b/src/domain/session/rightpanel/disambiguator.js @@ -143,5 +143,15 @@ export function tests(){ d.disambiguate(vm1); assert.strictEqual(vm1.disambiguate, false); }, + + "Empty names must un-disambiguate": assert => { + const [vm1, vm2, d] = createVmAndDisambiguator([["", "a"], ["", "b"]]); + d.disambiguate(vm1); + d.disambiguate(vm2); + vm1.updateName("foo"); + d.disambiguate(vm1); + assert.strictEqual(vm1.disambiguate, false); + assert.strictEqual(vm2.disambiguate, false); + } }; }