mirror of
https://github.com/sasjs/adapter.git
synced 2026-04-18 19:53:14 +00:00
feat(sasjs-tests): update tests, use vite and minimal deps
This commit is contained in:
12
sasjs-tests/src/types/context.ts
Normal file
12
sasjs-tests/src/types/context.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type SASjs from '@sasjs/adapter'
|
||||
import type { SASjsConfig } from '@sasjs/adapter'
|
||||
|
||||
export interface AppConfig {
|
||||
sasJsConfig: SASjsConfig
|
||||
}
|
||||
|
||||
export interface AppState {
|
||||
config: AppConfig | null
|
||||
adapter: SASjs | null
|
||||
isLoggedIn: boolean
|
||||
}
|
||||
2
sasjs-tests/src/types/index.ts
Normal file
2
sasjs-tests/src/types/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './test'
|
||||
export * from './context'
|
||||
24
sasjs-tests/src/types/test.ts
Normal file
24
sasjs-tests/src/types/test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
export interface Test {
|
||||
title: string
|
||||
description: string
|
||||
beforeTest?: (...args: any) => Promise<any>
|
||||
afterTest?: (...args: any) => Promise<any>
|
||||
test: (context: any) => Promise<any>
|
||||
assertion: (...args: any) => boolean
|
||||
}
|
||||
|
||||
export interface TestSuite {
|
||||
name: string
|
||||
tests: Test[]
|
||||
beforeAll?: (...args: any) => Promise<any>
|
||||
afterAll?: (...args: any) => Promise<any>
|
||||
}
|
||||
|
||||
export interface TestResult {
|
||||
result: boolean
|
||||
error: Error | null
|
||||
executionTime: number
|
||||
}
|
||||
|
||||
export type TestStatus = 'pending' | 'running' | 'passed' | 'failed'
|
||||
Reference in New Issue
Block a user