viki-web-utils
Advanced tools
Comparing version 0.0.13 to 0.0.14
@@ -29,3 +29,6 @@ 'use strict'; | ||
return fetch(this.resource).then(function (resolve, reject) { | ||
var request = new Request(this.resource, { | ||
mode: 'no-cors' | ||
}); | ||
return fetch(request).then(function (resolve, reject) { | ||
return Promise.resolve({ | ||
@@ -32,0 +35,0 @@ blocked: false, |
{ | ||
"name": "viki-web-utils", | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"description": "Utils used by the Viki web app", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -65,2 +65,15 @@ /* eslint-env jasmine */ | ||
}); | ||
it('promise returned should resolve with blocked: false if resource is available', (done) => { | ||
const url = 'https://secure.quantserve.com/quant.js' | ||
this.checker = new BlockedResourceChecker(url); | ||
const promise = this.checker.test(); | ||
promise.then(function (res) { | ||
expect(res).toEqual({ | ||
blocked: false, | ||
resource: url, | ||
}); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
@@ -67,0 +80,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1187728
2487