Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should support relative', function(){
assert(false === url.isAbsolute('foo'));
assert(false === url.isAbsolute('foo/bar/baz'));
assert(false === url.isAbsolute('/foo/bar/baz'));
assert(false === url.isAbsolute('foo.com/something'));
})
})
it('should support relative', function(){
assert(false === url.isAbsolute('foo'));
assert(false === url.isAbsolute('foo/bar/baz'));
assert(false === url.isAbsolute('/foo/bar/baz'));
assert(false === url.isAbsolute('foo.com/something'));
})
})
it('should support scheme://', function(){
assert(true === url.isAbsolute('http://foo.com'));
})
it('should support relative', function(){
assert(false === url.isAbsolute('foo'));
assert(false === url.isAbsolute('foo/bar/baz'));
assert(false === url.isAbsolute('/foo/bar/baz'));
assert(false === url.isAbsolute('foo.com/something'));
})
})
it('should support //', function(){
assert(true === url.isAbsolute('//foo.com'));
})
it('should support relative', function(){
assert(false === url.isAbsolute('foo'));
assert(false === url.isAbsolute('foo/bar/baz'));
assert(false === url.isAbsolute('/foo/bar/baz'));
assert(false === url.isAbsolute('foo.com/something'));
})
})
each(links, function(link){
if ('stylesheet' != link.getAttribute('rel')) return;
if (url.isAbsolute(link.getAttribute('href'))) return;
styles.push(link);
});