diff --git a/package.json b/package.json index 89cf55dc75..2452f57a3c 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ }, "scripts": { "start": "docker compose up -d && grunt", - "coverage": "PUPPETEER_ARGS='--no-sandbox' PUPPETEER_EXECUTABLE_PATH=$(which chromium) mochify --transform [ babelify ] --plugin [ mochify-istanbul --exclude '**/+(tests|node_modules|libs)/**/*' --report lcov --dir ./coverage --instrumenter babel-istanbul] --reporter spec ./tests/harness/common './tests/js/web/**/*Test.js'", + "coverage": "mochify --transform [ babelify ] --plugin [ mochify-istanbul --exclude '**/+(tests|node_modules|libs)/**/*' --report lcov --dir ./coverage --instrumenter babel-istanbul] --reporter spec ./tests/harness/common './tests/js/web/**/*Test.js'", "test": "npm run test:headless", "build:tests": "grunt javascript:tests", "build:tests:watch": "grunt javascript:tests:watch", - "test:headless": "PUPPETEER_ARGS='--no-sandbox' PUPPETEER_EXECUTABLE_PATH=$(which chromium) mochify --reporter spec --transform [ babelify ] ./tests/harness/common './tests/js/web/**/*Test.js'", + "test:headless": "mochify --reporter spec --transform [ babelify ] ./tests/harness/common './tests/js/web/**/*Test.js'", "test:browser": "npm run build:tests && open ./tests/js/web/index.html", "test:browser:watch": "npm run build:tests:watch" }, diff --git a/tests/js/web/Notifications/FaviconEditorTest.js b/tests/js/web/Notifications/FaviconEditorTest.js index ead99ab76f..caac27f6b8 100644 --- a/tests/js/web/Notifications/FaviconEditorTest.js +++ b/tests/js/web/Notifications/FaviconEditorTest.js @@ -145,21 +145,7 @@ describe('FaviconEditor', () => { faviconEditor = new FaviconEditor($root[0]); faviconEditor.init(); - // Override serializer to return raw image data, we cannot use the default - // canvas.toDataURL(...) here as the png compression is different when - // in the browser / headless test environments - faviconEditor.setSerializer((canvas, ctx) => { - const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height); - const debugCvs = document.createElement('canvas'); - const debugCtx = debugCvs.getContext('2d'); - - debugCtx.width = canvas.width; - debugCtx.height = canvas.height; - debugCtx.putImageData(imageData, 0, 0); - actual = debugCvs.toDataURL('image/png'); - - return [...imageData.data]; - }); + canvas.toDataURL('image/png'); faviconEditor.addCircleNotification('red', 5) .then((data) => {