Initial Commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
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));
|
||||
}
|
||||
Reference in New Issue
Block a user