Add failing test

For empty names not un-disambiguating

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-07-02 15:59:29 +05:30
parent 89e256e563
commit 11d411c9a9

View File

@ -143,5 +143,15 @@ export function tests(){
d.disambiguate(vm1); d.disambiguate(vm1);
assert.strictEqual(vm1.disambiguate, false); 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);
}
}; };
} }