0729e4ea1d
- dailies T2: switch ordering test to central-asia-2023 (pixelfed-1 oldest, pixelfed-22 newest) - dailies T3-T6: update KNOWN_SLUG/TITLE/CITY/COUNTRY to the real japan entry (2026-06-17) - stories S1-S7: update all italy-2025 URLs to italy-2026-demo - stories S5/S6: fix URL regex and use val-dorcia-dawn for hero sanity check - maps M5/M6: point Italy GPX map tests to italy-2026-demo (has markers + GPX) - global-setup: run make demo-load before tests so italy-2026-demo always exists - post P2: add retries:1 + test.setTimeout(60s) for intermittent FilePond upload - user: story template hero fallback for media.types config override (see user commit) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vgmzx8VTTTmCskSpQtsLTr
19 lines
712 B
JavaScript
19 lines
712 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const { execSync } = require('child_process');
|
|
|
|
module.exports = async function globalSetup() {
|
|
const envFile = path.join(__dirname, '../.env');
|
|
if (fs.existsSync(envFile)) {
|
|
fs.readFileSync(envFile, 'utf-8').split(/\r?\n/).forEach(line => {
|
|
const m = line.match(/^([A-Za-z_][A-Za-z0-9_]*)=(.*)$/);
|
|
if (m && !process.env[m[1]]) {
|
|
process.env[m[1]] = m[2].trim().replace(/^(['"])(.*)\1$/, '$2');
|
|
}
|
|
});
|
|
}
|
|
|
|
// Ensure demo content is loaded (italy-2026-demo trip + stories + GPX files)
|
|
execSync('make demo-load', { cwd: path.join(__dirname, '..'), stdio: 'inherit' });
|
|
};
|