1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-10 17:04:36 +00:00
Files
adapter/sasjs-tests/src/config/loader.ts

15 lines
363 B
TypeScript

import type { AppConfig } from '../types'
export interface ConfigWithCredentials extends AppConfig {
userName?: string
password?: string
}
export async function loadConfig(): Promise<ConfigWithCredentials> {
const response = await fetch('config.json')
if (!response.ok) {
throw new Error('Failed to load config.json')
}
return response.json()
}