mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 00:50:05 +00:00
feat(sasjs-tests): update tests, use vite and minimal deps
This commit is contained in:
14
sasjs-tests/src/config/loader.ts
Normal file
14
sasjs-tests/src/config/loader.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user