* Tests trust determination by referrer. * @param {string} referrer URL under test. * @param {boolean} toBeTrusted The expected outcome.
(referrer, toBeTrusted)
| 463 | * @param {boolean} toBeTrusted The expected outcome. |
| 464 | */ |
| 465 | function test(referrer, toBeTrusted) { |
| 466 | it('testing ' + referrer, () => { |
| 467 | expect(isTrustedReferrer(referrer)).to.equal(toBeTrusted); |
| 468 | }); |
| 469 | } |
| 470 | |
| 471 | it('should return true for allowlisted hosts', () => { |
| 472 | test('https://t.co/docref', true); |
no test coverage detected