import fs from 'fs'; import path from 'path'; import { getStorageState } from './pwhelpers.js'; export default async function globalSetup() { const storageState = await getStorageState(); const outPath = path.resolve(__dirname, '.auth', 'ig-session.json'); fs.mkdirSync(path.dirname(outPath), { recursive: true }); fs.writeFileSync(outPath, JSON.stringify(storageState)); }