Skip to main content

Class: TestCase

testUtil/TestCase.TestCase

Constructors

constructor

new TestCase(command, context, spyIde, isHatTokenMapTest?, isDecorationsTest?, startTimestamp, captureFinalThatMark, extraSnapshotFields?)

Parameters

NameTypeDefault value
commandnever & never & never & CommandV3 & { version: 3 }undefined
contextTestCaseContextundefined
spyIdeSpyIDEundefined
isHatTokenMapTestbooleanfalse
isDecorationsTestbooleanfalse
startTimestampbigintundefined
captureFinalThatMarkbooleanundefined
extraSnapshotFields?keyof TestCaseSnapshot[]undefined

Defined in

testUtil/TestCase.ts:55

Properties

_awaitingFinalMarkInfo

Private _awaitingFinalMarkInfo: boolean

Defined in

testUtil/TestCase.ts:50


command

command: never & never & never & CommandV3 & { version: 3 }

Defined in

testUtil/TestCase.ts:52


decorations

Private Optional decorations: PlainTestDecoration[]

Defined in

testUtil/TestCase.ts:45


finalState

Private Optional finalState: TestCaseSnapshot

Defined in

testUtil/TestCase.ts:46


fullTargets

Private fullTargets: TargetDescriptor[]

Defined in

testUtil/TestCase.ts:43


initialState

Private initialState: null | TestCaseSnapshot = null

Defined in

testUtil/TestCase.ts:44


languageId

Private languageId: string

Defined in

testUtil/TestCase.ts:42


marksToCheck

Private Optional marksToCheck: string[]

Defined in

testUtil/TestCase.ts:51


returnValue

Private Optional returnValue: unknown

Defined in

testUtil/TestCase.ts:48


spyIdeValues

Private Optional spyIdeValues: SpyIDERecordedValues

Defined in

testUtil/TestCase.ts:53


targetKeys

Private targetKeys: string[]

Defined in

testUtil/TestCase.ts:49


thrownError

Optional thrownError: ThrownError

Defined in

testUtil/TestCase.ts:47

Accessors

awaitingFinalMarkInfo

get awaitingFinalMarkInfo(): boolean

Returns

boolean

Defined in

testUtil/TestCase.ts:227

Methods

filterMarks

filterMarks(command, context): void

Parameters

NameType
commandnever & never & never & CommandV3 & { version: 3 }
contextTestCaseContext

Returns

void

Defined in

testUtil/TestCase.ts:208


getExcludedFields

Private getExcludedFields(isInitialSnapshot): ("clipboard" | "visibleRanges" | "thatMark" | "sourceMark")[]

Parameters

NameType
isInitialSnapshotboolean

Returns

("clipboard" | "visibleRanges" | "thatMark" | "sourceMark")[]

Defined in

testUtil/TestCase.ts:116


getMarks

Private getMarks(): SerializedMarks

Returns

SerializedMarks

Defined in

testUtil/TestCase.ts:84


includesThatMark

Private includesThatMark(target, type): boolean

Parameters

NameType
targetTargetDescriptor
typestring

Returns

boolean

Defined in

testUtil/TestCase.ts:101


recordDecorations

recordDecorations(): void

Returns

void

Defined in

testUtil/TestCase.ts:77


recordFinalState

recordFinalState(returnValue): Promise<void>

Parameters

NameType
returnValueunknown

Returns

Promise<void>

Defined in

testUtil/TestCase.ts:187


recordInitialState

recordInitialState(): Promise<void>

Returns

Promise<void>

Defined in

testUtil/TestCase.ts:173


recordSpyIdeValues

Private recordSpyIdeValues(): void

Returns

void

Defined in

testUtil/TestCase.ts:204


toYaml

toYaml(): string

Returns

string

Defined in

testUtil/TestCase.ts:151