You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
senzapaura_es/scripts/estudio/probar.mjs

18 lines
607 B

import { spawnSync } from 'node:child_process';
import { readFileSync } from 'node:fs';
import { parseEnv } from 'node:util';
const env = parseEnv(readFileSync(process.argv[2] ?? '.env.estudio.local', 'utf8'));
if (!/^estudio_pruebas_/.test(env.ESTUDIO_ESQUEMA))
throw Error('Se necesita una base de pruebas aislada.');
const result = spawnSync(
process.execPath,
[
'node_modules/vitest/vitest.mjs',
'run',
'src/estudio/server/estudio.spec.ts',
'--project=server'
],
{ stdio: 'inherit', env: { ...process.env, ...env, TEST_ESTUDIO_URL: env.DATABASE_URL } }
);
process.exit(result.status ?? 1);

Powered by TurnKey Linux.