-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.ts
40 lines (32 loc) · 902 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
export interface TestCase {
testName: string
suiteName?: string
filepath?: string
}
export interface AdapterInput {
testsToRun?: TestCase[]
reportFormat?: string
}
export interface AdapterOutput {
exitCode?: number | null
}
type ExecuteTestsReturnValue = Promise<AdapterOutput> | AdapterOutput
export interface Adapter {
executeTests(options: AdapterInput): ExecuteTestsReturnValue
executeTests(options: AdapterInput, context: RunnerContext): ExecuteTestsReturnValue
}
export interface ProtocolResult {
version: string
testsToRun?: string
logFileName?: string
reportFormat?: string
testsToRunFile?: string
}
export type LogLevel = 'debug' | 'info' | 'warn' | 'error'
export interface RunnerContext {
extraArgs: string[]
cwd: string
logLevel: LogLevel
}