diff --git a/src/__snapshots__/cli.test.ts.snap b/src/__snapshots__/cli.test.ts.snap index 781caef8..4b01e3da 100644 --- a/src/__snapshots__/cli.test.ts.snap +++ b/src/__snapshots__/cli.test.ts.snap @@ -21,3 +21,25 @@ exports[`CLI integrates with main API and creates an output with generated meta " `; + +exports[`CLI integrates with npx 1`] = ` +" + + + + + + + + + + + + + + + + + +" +`; diff --git a/src/cli.test.ts b/src/cli.test.ts index 11541887..378972ab 100644 --- a/src/cli.test.ts +++ b/src/cli.test.ts @@ -38,4 +38,32 @@ describe('CLI', () => { ); expect(new Set(flagShorthands).size).toBe(flagShorthands.length); }); + + test('integrates with npx', async () => { + let response = { stdout: '', stderr: '' }; + try { + response = await execa( + 'npx', + [ + '-p .', + 'pwa-asset-generator', + './static/logo.png', + './temp', + '--scrape=false', + '--splash-only', + '--landscape-only', + '--favicon', + '--path="%PUBLIC_URL%"', + '--dark-mode', + '--type=jpg', + '--quality=20', + ], + { env: { PAG_TEST_MODE: '1' } }, + ); + } catch (e) { + // eslint-disable-next-line no-console + console.error(e); + } + expect(response.stdout).toMatchSnapshot(); + }); }); diff --git a/src/config/constants.ts b/src/config/constants.ts index dfb35e47..979dc9c7 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -142,7 +142,6 @@ export default { }, CHROME_LAUNCH_ARGS: [ - '--disable-dev-shm-usage', '--log-level=3', // Fatal only '--no-default-browser-check', '--disable-infobars',