uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
.
/
public_html
/
wp-content
/
plugins
/
wp-smushit
/
_src
/
js
/
__tests__
/
detector.test.js
/
/
import {describe, expect, test, it} from "@jest/globals"; import {LCPDetector, SmushLCPDetector} from '../frontend/detector'; describe('background data from property value', () => { const dataSet = [ [ // background-image: url "url('http://localhost/wp-content/uploads/2024/08/image1.jpeg')", 'background-image', [ 'http://localhost/wp-content/uploads/2024/08/image1.jpeg' ] ], [ // background-image: image-set "image-set(" + "'http://localhost/wp-content/uploads/2024/08/image1-768x437.jpeg' 1x, " + "'http://localhost/wp-content/uploads/2024/08/image1.jpeg' 2x" + ");", 'background-image-set', [ 'http://localhost/wp-content/uploads/2024/08/image1-768x437.jpeg', 'http://localhost/wp-content/uploads/2024/08/image1.jpeg', ] ], [ // background-image: image-set with url "image-set(" + "url('http://localhost/wp-content/uploads/2024/08/image1-768x437.jpeg') 1x, " + "url('http://localhost/wp-content/uploads/2024/08/image1.jpeg') 2x" + ");", 'background-image-set', [ 'http://localhost/wp-content/uploads/2024/08/image1-768x437.jpeg', 'http://localhost/wp-content/uploads/2024/08/image1.jpeg', ] ], [ // background-image: image-set query params "image-set(" + "http://localhost/wp-content/uploads/2024/08/image1-768x437.jpeg?hello=world 1x, " + "http://localhost/wp-content/uploads/2024/08/image1.jpeg?yellow=world 2x" + ");", 'background-image-set', [ 'http://localhost/wp-content/uploads/2024/08/image1-768x437.jpeg?hello=world', 'http://localhost/wp-content/uploads/2024/08/image1.jpeg?yellow=world', ] ], ]; it.each(dataSet)('returns correct data for given property value', (propertyValue, type, urls) => { const lcpDetector = new SmushLCPDetector(); const backgroundDataForElement = lcpDetector.getBackgroundDataForPropertyValue(propertyValue); expect(backgroundDataForElement).toStrictEqual({ type: type, property: propertyValue, urls: urls, }); }); });
/home/batcwwjx/./public_html/wp-content/plugins/wp-smushit/_src/js/__tests__/detector.test.js