bv-ui-core
Advanced tools
Comparing version 2.9.2 to 2.9.3
@@ -86,3 +86,4 @@ | ||
if (canBeCached) { | ||
const clonedResponse = response.clone() | ||
const clonedResponse = response.clone(); | ||
const sizeCheck = response.clone(); | ||
const newHeaders = new Headers(); | ||
@@ -94,3 +95,3 @@ clonedResponse.headers.forEach((value, key) => { | ||
// Get response text to calculate its size | ||
clonedResponse.text().then(text => { | ||
sizeCheck.text().then(text => { | ||
// Calculate size of response text in bytes | ||
@@ -97,0 +98,0 @@ const sizeInBytes = new Blob([text]).size; |
{ | ||
"name": "bv-ui-core", | ||
"version": "2.9.2", | ||
"version": "2.9.3", | ||
"license": "Apache 2.0", | ||
@@ -5,0 +5,0 @@ "description": "Bazaarvoice UI-related JavaScript", |
@@ -143,12 +143,13 @@ //Imports | ||
// Check if response is fetched from network | ||
expect(response).to.not.be.null; | ||
console.log(response.body) | ||
setTimeout(() => { | ||
expect(response).to.not.be.null; | ||
console.log(response.body) | ||
// Check if caches.match was called | ||
expect(cacheStub.calledOnce).to.be.false; | ||
expect(cacheStub.calledOnce).to.be.false; | ||
// Check if response is not cached | ||
const cachedResponse = cacheStorage.get(url); | ||
expect(cachedResponse).to.be.undefined; | ||
const cachedResponse = cacheStorage.get(url); | ||
expect(cachedResponse).to.be.undefined; | ||
}, 500) | ||
done(); | ||
@@ -155,0 +156,0 @@ }) |
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
263816
6144