(key)
| 304 | const aliasKeys = new Set(aliasEntries.map(([key]) => key)); |
| 305 | const explicitContractKeys = new Set(TOKEN_COMPATIBILITY_ALIAS_CONTRACTS.map(contract => contract.key)); |
| 306 | const resolveFamilyContract = (key) => { |
| 307 | const family = TOKEN_COMPATIBILITY_ALIAS_FAMILY_CONTRACTS.find(contract => ( |
| 308 | key.startsWith(contract.prefix) && key.length > contract.prefix.length |
| 309 | )); |
| 310 | if (!family) { |
| 311 | return null; |
| 312 | } |
| 313 | return { |
| 314 | key, |
| 315 | canonical: `${family.canonicalPrefix}${key.slice(family.prefix.length)}`, |
| 316 | }; |
| 317 | }; |
| 318 | |
| 319 | assert.ok(aliasEntries.length > 0, 'widget iframe compatibility aliases must be explicit'); |
| 320 | assert.equal(aliasKeys.size, aliasEntries.length, 'widget iframe compatibility aliases must be unique'); |
no test coverage detected