MCPcopy
hub / github.com/ampproject/amphtml / testRelUrl

Function testRelUrl

test/unit/test-url.js:813–830  ·  view source on GitHub ↗
(href, baseHref, resolvedHref)

Source from the content-addressed store, hash-verified

811
812describes.sandboxed('resolveRelativeUrl', {}, () => {
813 function testRelUrl(href, baseHref, resolvedHref) {
814 it(
815 'should return the resolved rel url from ' +
816 href +
817 ' with base ' +
818 baseHref,
819 () => {
820 expect(resolveRelativeUrl(href, baseHref)).to.equal(
821 resolvedHref,
822 'native or fallback'
823 );
824 expect(resolveRelativeUrlFallback_(href, baseHref)).to.equal(
825 resolvedHref,
826 'fallback'
827 );
828 }
829 );
830 }
831
832 // Absolute URL.
833 testRelUrl(

Callers 1

test-url.jsFile · 0.85

Calls 4

resolveRelativeUrlFunction · 0.90
expectFunction · 0.85
itFunction · 0.50

Tested by

no test coverage detected