Skip to content

Commit

Permalink
Revert "Debug JPEG conversion"
Browse files Browse the repository at this point in the history
This reverts commit ca02a7f.
  • Loading branch information
yhatt committed Jan 21, 2025
1 parent ca02a7f commit a4cc000
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ commands:
command: npm run test:coverage -- --ci --reporters=default --reporters=jest-junit <<#parameters.runInBand>>-i<</parameters.runInBand>><<^parameters.runInBand>>--maxWorkers=2<</parameters.runInBand>>
environment:
CHROME_DISABLE_GPU: 1 # Disable GPU acceleration to mitigate flaky tests
DEBUG: marp-cli:jpeg
JEST_JUNIT_CLASSNAME: '{filepath}'
JEST_JUNIT_OUTPUT_DIR: tmp/test-results
MARP_TEST_CI: 1
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
- name: Jest
env:
CHROME_DISABLE_GPU: 1 # Disable GPU acceleration to mitigate flaky tests
DEBUG: marp-cli:jpeg
JEST_JUNIT_CLASSNAME: '{filepath}'
JEST_JUNIT_OUTPUT_DIR: tmp/test-results
MARP_TEST_CI: 1
Expand Down
8 changes: 1 addition & 7 deletions src/utils/jpeg.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import dbg from 'debug'
import { Browser } from '../browser/browser'

const debug = dbg('marp-cli:jpeg')
import { debug } from './debug'

export const png2jpegViaPuppeteer = async (
browser: Browser,
Expand All @@ -15,8 +13,6 @@ export const png2jpegViaPuppeteer = async (
waitUntil: ['domcontentloaded', 'networkidle0'],
})

debug('Evaluating JavaScript to convert PNG to JPEG')

const jpegDataURL = await page.evaluate(
async (pngUri, q, timeout) => {
/* c8 ignore start */
Expand Down Expand Up @@ -56,8 +52,6 @@ export const png2jpegViaPuppeteer = async (
browser.timeout
)

debug('Evaluated JavaScript to convert PNG to JPEG')

if (!jpegDataURL.startsWith('data:image/jpeg;base64,'))
throw new Error('Failed to convert PNG to JPEG')

Expand Down

0 comments on commit a4cc000

Please sign in to comment.