Skip to content

Commit f2f9cfc

Browse files
Apply suggestions from code review
Co-authored-by: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com>
1 parent 3a7a9b1 commit f2f9cfc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

tests/static/xref/disambiguation.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const overload = (uri) => ({
4646
});
4747

4848
describe("xref/script - detectOverloadedEntries", () => {
49-
it("does not throw (no Map.prototype.getOrInsert) and flags overloaded pairs", () => {
49+
it("flags overloaded pairs", () => {
5050
const pairs = detectOverloadedEntries(
5151
[overload(URI_A), overload(URI_B)],
5252
"postMessage()",
@@ -74,9 +74,7 @@ describe("xref/script - detectOverloadedEntries", () => {
7474
expect(pairs.size).toBe(0);
7575
});
7676

77-
it("handles entries with no `for` list (the former getOrInsert path)", () => {
78-
// These entries hit the else branch that previously called the unshipped
79-
// Map.prototype.getOrInsert; the empty forContext key is "".
77+
it("handles entries with no `for` list", () => {
8078
const noFor = (uri) => ({
8179
type: "method",
8280
spec: "html",

0 commit comments

Comments
 (0)