0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00
astro/packages/integrations/netlify/test/test-utils.js
alexanderniebuhr 31863b8023 [ci] format
2023-10-16 14:26:36 +00:00

12 lines
293 B
JavaScript

import { execa } from 'execa';
/** Returns a process running the Astro CLI. */
export function cli(/** @type {string[]} */ ...args) {
const spawned = execa('npx', ['astro', ...args], {
env: { ASTRO_TELEMETRY_DISABLED: true },
});
spawned.stdout.setEncoding('utf8');
return spawned;
}