MCPcopy Create free account
hub / github.com/ampproject/amphtml / testProtocolValid

Function testProtocolValid

test/unit/test-url.js:625–635  ·  view source on GitHub ↗
(href, bool)

Source from the content-addressed store, hash-verified

623
624describes.sandboxed('isProtocolValid', {}, () => {
625 function testProtocolValid(href, bool) {
626 it(
627 'should return that ' +
628 href +
629 (bool ? ' is' : ' is not') +
630 ' a valid protocol',
631 () => {
632 expect(isProtocolValid(href)).to.equal(bool);
633 }
634 );
635 }
636
637 testProtocolValid('http://foo.com', true);
638 testProtocolValid('https://foo.com', true);

Callers 1

test-url.jsFile · 0.85

Calls 3

isProtocolValidFunction · 0.90
expectFunction · 0.85
itFunction · 0.50

Tested by

no test coverage detected